@import "../../../node_modules/tiny-slider/dist/tiny-slider.css";

.module-wrap {
	box-sizing: border-box;
	border-width: 0;
	border-style: solid;
	border-color: #e2e8f0;
	flex-basis: 100%;
	padding-left: 0.5rem;
	padding-right: 0.5rem;

	.leco-cp-cols-2 & {
		@media (min-width: 769px) {
			flex-basis: 50%;
		}
	}

	.leco-cp-cols-3 & {
		@media (min-width: 769px) {
			flex-basis: 50%;
		}
		@media (min-width: 1024px) {
			flex-basis: 33.33333%;
		}
	}

	.leco-cp-cols-4 & {
		@media (min-width: 769px) {
			flex-basis: 50%;
		}
		@media (min-width: 1024px) {
			flex-basis: 25%;
		}
	}

	.leco-cp-cols-5 & {
		@media (min-width: 769px) {
			flex-basis: 50%;
		}
		@media (min-width: 1065px) {
			flex-basis: 20%;
		}
	}
}

.module-wrap {
	position: relative;

	.module {
		display: block;
		position: relative;
		margin-bottom: 1.25rem;
		--bg-opacity: 1;
		background-color: #fff;
		background-color: rgba(255, 255, 255, var(--bg-opacity));
		border-width: 1px;
		border-style: solid;
		font-size: 0.875rem;
		line-height: 1.25;
		text-align: center;
		padding: 1.125rem 1.875rem;
		min-height: 11.75rem;
		border-color: #e7eaec;
		color: #8594a3 !important;

		@media (min-width: 1024px) {
			height: calc(100% - 1.25rem);
		}
	}
}

.module .ico-area {
	display: block;
	line-height: 1;
	font-size: 2.626rem;
	margin: 0 0 0.625rem;
}

.module .title {
	display: block;
	font-size: 1.125rem;
	line-height: 1.25;
	margin-bottom: 0.75rem;
	color: var(--leco-cp-theme--dark-blue);
}

.module .upload {
	align-items: center;
	display: flex;
	gap: 5px;
	justify-content: center;
	margin: 1rem 0 0.5rem;

	svg {
		width: 0.8rem;
	}
}

.module:hover {
	color: #8594a3;
	cursor: pointer;
	box-shadow: 0 0 5px var(--wp--preset--color--leco-cp-primary);
}

.module.inactive {
	pointer-events: none;
}

.module.unclickable:hover {
	box-shadow: none;
	cursor: default;
}

.module.inactive {
	opacity: 0.5;
}

.iconset {
	display: inline-block;
	margin: 0.2em;
	padding-top: 3px;
	width: 2.25rem;
	height: auto;

	svg * {
		stroke: currentColor;
		color: #8594a3;
	}
}

button.file-delete {
	padding: 0;
}

.components-modal__screen-overlay:has(.leco-cp__confirm-modal) {
	background-color: var(--leco-cp-theme--bg-gray);
	box-shadow: 2px 2px 20px -8px rgba(0, 0, 0, 0.61);
	height: fit-content;
	padding: 0;
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: fit-content;
	z-index: 9993;
}

.leco-cp__confirm-modal {
	box-shadow: none;
	max-width: 100%;

	.components-modal__header {
		position: relative;
		margin-top: 20px;
		margin-bottom: 25px;

		.components-modal__header-heading {
			font-size: 1.2rem;
			font-weight: 600;
		}

		button {
			padding: 0;
			position: absolute;
			top: -40px;
			right: 0px;
			left: auto;
		}
	}

	.components-modal__content {
		margin-top: 0;
		padding: 30px 20px;
	}
}

.leco-cp__confirm-button,
.leco-cp__cancel-button {
	border: none;
	border-radius: 5px;
	color: white;
	cursor: pointer;
	font-size: 1rem;
	margin: 0 0.5rem;
	padding: 0.5rem 1rem;

	&:hover,
	&:focus,
	&:active {
		color: white;
	}
}

.leco-cp__confirm-modal--btns {
	display: flex;
	justify-content: center;
}

.leco-cp__confirm-button {
	background-color: var(--leco-cp-theme--blue) !important;
}

.leco-cp__cancel-button {
	background-color: var(--leco-cp-theme--red) !important;
}

// Slider styles

.lity-container {
	@media screen and (max-width: 800px) {
		height: 100%;

		@supports (height: 100dvh) {
			height: 100dvh;
		}
	}
}

.lity-content:has(.image-slider-wrapper) {
	@media screen and (max-width: 800px) {
		display: flex;
		height: 100%;
	}
}

.image-slider-wrapper {
	display: flex;
	flex-direction: column;
	max-height: 800px;
	max-width: 800px;

	@media screen and (max-width: 800px) {
		height: 100%;
		max-height: 100% !important;
	}
}

.leco-cp__slider-meta,
.leco-cp__slider-buttons-container,
.leco-cp__slider--navigation {
	align-items: center;
	display: flex;
	gap: 20px;
}

.leco-cp__slider-meta {
	border-top: 1px solid var(--leco-cp-theme--gray-light);
	flex-wrap: wrap;
	justify-content: space-between;
	padding-top: 12.5px;
	padding-bottom: 14.5px;
}

.leco-cp__slider--image-name {
	font-weight: 600;

	@media screen and (max-width: 800px) {
		flex-basis: 100%;
	}
}

.leco-cp__slider--navigation {
	gap: 10px;
}

.leco-cp__slider--navigation-prev,
.leco-cp__slider--navigation-next {
	background-color: transparent;
	padding: 0;

	svg {
		path {
			fill: var(--leco-cp-theme--dark-blue);
		}
	}

	&:disabled {
		pointer-events: none;
		opacity: 0.3;
	}
}

.leco-cp__slide--downloads-container {
	position: relative;
}

.leco-cp__slide--download {
	align-items: center;
	background-color: var(--leco-cp-theme--bg-gray);
	border-bottom: none;
	border-radius: 26px;
	color: #3c5063;
	gap: 5.5px;
	display: flex;
	font-weight: 600;
	padding: 8px 16px;

	&:hover,
	&:focus {
		background-color: #edf1f3;
		color: #1e2b37;

		svg {
			path {
				stroke: #1e2b37;
			}
		}
	}

	svg {
		width: 15px;
	}
}

.leco-cp__slide--download-dropdown {
	background-color: #fff;
	border: 1px solid var(--leco-cp-theme--bg-gray);
	border-radius: 15px;
	box-shadow: 0 0 5px rgba(51, 61, 85, 0.25);
	display: none;
	flex-direction: column;
	padding: 15px 16px;
	position: absolute;
	top: 44px;
	right: 0;
	width: 238px;
	z-index: 20;

	&.is-active {
		display: flex;
	}
}

.leco-cp__slide--download-link {
	background-color: transparent;
	border: none;
	border-radius: 5px;
	color: var(--leco-cp-theme--dark-blue);
	font-size: 14px;
	font-weight: 600;
	padding: 10px 16px 13px 16px;
	text-decoration: none;
	text-align: left;

	&:hover,
	&:focus {
		background-color: var(--leco-cp-theme--bg-gray);
		color: #3c5063;
	}
}

.leco-cp__slide--inner-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 100%;
}

.leco-cp__slide {
	height: 100%;
	display: inline-flex !important;
	text-align: center;
	padding: 0;
	vertical-align: middle !important;

	.leco-cp__slide--image {
		align-items: center;
		display: flex;
		justify-content: center;
	}

	img {
		max-height: 600px;
		max-width: 100%;
	}
}

.tns-outer {
	height: 100%;
	position: relative;
	width: 100%;

	&:before {
		content: "";
		position: absolute;
		top: 0;
		left: -50px;
		right: -50px;
		bottom: -40px;
		background-color: var(--leco-cp-theme--bg-gray);
	}
}

.leco-cp__slider,
.tns-inner,
.tns-ovh {
	height: 100%;
}
