/**
 * The following styles get applied inside the editor only.
 *
 * Replace them with your own styles or remove the file completely.
 */

/* BOF support for the  full width block (we need to limit the width of  the  block) */

@import '~style';

@media (min-width: 782px) {
	body {
		// non full screen mode (admin-menu sidebar has 160px)
		// editor right  hand side side-bar has 300px
		.edit-post-layout {
			.flo-slick-slider-block-slider {
				max-width: calc(100vw - 160px);
			}

			&.is-sidebar-opened {
				.flo-slick-slider-block-slider {
					//max-width: 100vw;
					max-width: calc(100vw - 160px - var(--editor-sidebar-width));
				}
			}
		}

		// full  screen mode
		&.is-fullscreen-mode {
			.edit-post-layout {
				.flo-slick-slider-block-slider {
					max-width: 100vw;
				}

				&.is-sidebar-opened {
					.flo-slick-slider-block-slider {
						//max-width: 100vw;
						max-width: calc(100vw - var(--editor-sidebar-width));
					}
				}
			}
		}
	}
}
/* BOF support for the  full width block */

.wp-block-flo-block-slider {
	color: var(--base-charcoal);
	padding: 10px;

	&__no-img {
		p {
			text-align: center;
			padding: 20px 200px;
			border: 1px solid #1e1e1e;
			max-width: 80%;
			margin: 0 auto;
			border-radius: 2px;
			font-size: 11px !important;
			line-height: 15px !important;
			color: #747474;
		}
	}

	button.flo-slideshow-add-slide {
		background-color: var(--base-charcoal);
		color: #fff;
		padding: 11px 20px;
		border-radius: 5px;
		display: flex;
		align-items: center;
		margin: 0 auto;
		height: 40px;
		@include function-title;

		&:hover {
			color: #fff;
		}

		i {
			font-size: 15px;
			margin-left: 20px;

			&:before {
				margin: 0;
			}
		}
	}

	.edit-slide-state--content-media {
		position: relative;
		width: 155px;
		height: 110px;
		border-radius: 5px;

		&:hover {
			&:before {
				opacity: 1;
			}
			.replace-media-icon,
			.mobile-image-focus {
				opacity: 1;
				pointer-events: auto;
			}
		}

		&:before {
			content: '';
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			pointer-events: none;
			background-color: rgba(black, 0.4);
			opacity: 0;
			border-radius: inherit;

			@include transition(opacity);
		}

		&-empty {
			border: 1px dashed #747474;

			.gbp-icon-image-upload {
				width: 100%;
				height: 100%;
				display: flex;
				align-items: center;
				justify-content: center;
				&:before {
					width: 15px;
					height: 15px;
					font-size: 15px;
				}
			}
		}

		.upload-media-icon {
			position: absolute;
			top: 50%;
			left: 50%;
			transform: translate(-50%, -50%);
			cursor: pointer;
			color: #747474;
		}
		.replace-media-icon,
		.mobile-image-focus {
			position: absolute;
			top: 10px;
			color: #d0d0d0;

			$size: 15px;
			width: $size;
			height: $size;
			font-size: $size;
			opacity: 0;

			@include clickable;
			@include transition(opacity, color);

			&:hover {
				color: white;
			}

			&:before {
				margin: 0 !important;
				display: block;
			}
		}
		.replace-media-icon {
			z-index: 2;
			width: 100%;
			height: 100%;
			top: 0;
			right: 0;

			&:before {
				right: 11px;
				top: 10px;
				position: absolute;
			}
		}
		.mobile-image-focus {
			right: 35px;
			z-index: 3;
		}
		img,
		video {
			max-width: 100%;
			max-height: 100%;
			display: block;
			margin: 0 auto;
			object-fit: cover;
			width: 100%;
			height: 100%;
			border-radius: 5px;
		}
	}
}

.flo-slick-slider-block-slider {
	&[data-content-position='type-b']
		.slick-arrow.flo-slick-slider-block-next-arrow {
		right: 50% !important;
		transform: translateX(9em);
	}
	&[data-content-position='type-b']
		.slick-arrow.flo-slick-slider-block-prev-arrow {
		left: 50% !important;
		transform: translateX(-9em);
	}
	&.singleitem:not(.edit-mode) {
		@media print, screen and (min-width: 768px) {
			&[data-full-screen-height='true'] {
				height: calc(100vh - 150px);

				.slick-slide {
					height: calc(100vh - 150px);
				}
			}
		}
	}
	.flo-slide {
		border-radius: 2px;
		height: 140px;
		// overflow: hidden;
		@include transition(border-color);

		&.edit-slide-state {
			border: 1px solid #d0d0d0;
			border-radius: 2px;
			margin-bottom: 15px;
			padding-left: 15px;
			display: flex;
			justify-content: space-between;

			.edit-slide-state--content {
				position: relative;
				display: flex;
				width: calc(100% - 36px);
				margin-top: 15px;
				margin-bottom: 15px;
			}

			.flo-slide-content {
				position: relative;
				margin: 0;
				margin-left: 20px;
				width: calc(100% - 175px);
				@include function-description;

				.top-side {
					margin-bottom: 10px;
					height: 40px;

					* {
						height: 100%;
					}
					.block-editor-rich-text__editable {
						display: flex;
						align-items: center;
						white-space: nowrap;
						padding: 10px 20px;
					}
				}
				.bottom-side-edit {
					height: 60px;
					* {
						height: 100%;
					}

					.block-editor-rich-text__editable {
						padding: 14px 20px;
					}
				}
				.flo-rich-text-control > div {
					padding: 12px 20px;
					border: 1px solid #e9e9e9;
					border-radius: 5px;
					box-sizing: border-box;
					// font-size: 12px;
					color: #2a2a2a;
					@include transition(border-color);

					&:focus {
						border-color: #2a2a2a;
					}
				}
			}

			.edit-slide-state--actions {
				position: relative;
				width: 36px;
				display: flex;
				align-items: center;
				flex-direction: column;
				justify-content: space-between;
				margin-left: 20px;
				background-color: #303030;
				color: #747474;
				padding: 15px 0;

				&-bottom {
					display: flex;
					flex-direction: column;
					align-items: center;
					width: 100%;
				}

				i {
					display: block;
					font-size: 15px;
					&:before {
						display: block;
						margin: 0;
					}
				}

				.reorder-handle {
					cursor: pointer;
					&:hover {
						color: #fff;
					}
				}
				.edit-slide-props {
					cursor: pointer;
					margin-bottom: 17px;

					&--wrapper {
						margin-bottom: 16px;
					}

					&:hover {
						color: #fff;
					}
				}
				.delete-slide {
					@include clickable;
					&:hover {
						color: #fff;
					}
				}
			}
		}

		&.active-slide {
			border-color: var(--base-charcoal);
		}

		&--content {
			padding: 20px;
			margin-bottom: 5px;
		}
	}

	.image-position-mobile {
		display: flex;
		align-items: stretch;
		flex-direction: column;

		position: absolute;
		top: 10px;
		left: -15px;
		width: 293px;
		padding: 20px;
		background-color: #303030;
		color: #fff;
		z-index: 11;
		border-radius: 5px;
		text-align: center;

		&--header {
			position: relative;
			text-align: left;
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 16px;
			@include function-title;

			.close-modal {
				right: 0;
				color: #747474;
			}
		}

		&--container-area {
			cursor: move;
			height: 100%;
			position: absolute;
			top: 0;
			width: 110px;

			&:before,
			&:after {
				content: ' ';
				position: absolute;
				top: 0;
				width: 100vw;
				height: 100%;
				background-color: rgba(black, 0.4);
			}
			&:before {
				left: 100%;
			}
			&:after {
				right: 100%;
			}
		}

		&--container-area-wrapper {
			display: inline-block;
			position: relative;
			overflow: hidden;
			border-radius: 5px;
		}

		&--container-area-aim {
			position: absolute;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			pointer-events: none;

			i {
				display: block;
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%, -50%);
				color: white;
				font-size: 15px;

				&:before {
					display: block;
					margin: 0;
				}
			}
		}

		img,
		video {
			// height: 158px !important;
			// width: auto;
			width: 100%;
			height: auto;
		}
	}
}

.slide-properties-modal {
	display: none;
	position: absolute;
	width: 246px;
	border-radius: 5px;
	z-index: 990;
	background: #303030;
	color: #fff;
	top: 0;
	right: 40px;
	box-shadow: -4px 4px 20px rgba(0, 0, 0, 0.15);

	&.visible {
		display: block;
	}

	&__header {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10px;
		border-bottom: 1px solid var(--fields-dark-hover);
	}
	div.slide-properties-modal--title {
		margin-top: 0;

		@include function-title;
	}
	.close-modal {
		cursor: pointer;

		font-size: 15px;
		$size: 15px;
		width: $size;
		height: $size;

		color: #747474;
		@include clickable;
		@include transition(color);

		&:hover {
			color: white;
		}

		&:before {
			display: block;
			margin: 0;
		}
	}

	&__content {
		padding: 17px 16px 20px 16px;
	}

	.flo-color-picker--title {
		font-size: 13px;
		margin-top: 0;
		margin-bottom: 8px;
	}

	.flo-color-picker__toggle {
		&:before {
			border-color: #fff;
		}
	}

	.flo-text-control {
		input {
			background-color: var(--fields-dark-still);
			outline: 0 !important;
			box-shadow: none !important;
			border: 0;
			color: white;
			@include function-title-light;

			&::placeholder {
				color: #747474;
			}
		}
	}

	.flo-color-picker {
		margin-bottom: 14px;
		&:last-child {
			margin-bottom: 0;
		}
		label {
			font-size: 13px;

			@include function-title-light;
		}
	}
	.components-base-control__field {
		margin-bottom: 15px;
	}

	.flo-toggle-control {
		.components-form-toggle {
			border: 1px solid #fff;
			border-radius: 25px;
			input:focus {
				box-shadow: none;
			}
			.components-form-toggle__track {
				background-color: var(--base-charcoal);
				box-shadow: none;
				outline: 0;
			}
			.components-form-toggle__thumb {
				background-color: #fff;
				border: 5px solid #fff;
			}
			.components-toggle-control__label {
				@include function-title-light;
			}

			&.is-checked {
				.components-form-toggle__track {
					background-color: #fff;
				}
				.components-form-toggle__thumb {
					background-color: var(--base-charcoal);
					border: 5px solid var(--base-charcoal);
				}
			}
		}
	}
}
.slick-slider-block-slider.multiple_items
	.slick-arrow.flo-slick-slider-block-next-arrow {
	right: 50% !important;
}
.slick-slider-block-slider.multiple_items
	.slick-arrow.flo-slick-slider-block-prev-arrow {
	left: 50% !important;
}

.flo-slider-tooltip {
	&--add {
		height: 100%;
		width: 100%;
	}

	&--replace {
		top: 0;
		right: 0;
	}

	.react-tooltip-lite {
		background-color: #3c434a;
		color: #fff;
	}
	.react-tooltip-lite-arrow {
		color: #3c434a;
	}
}
