/* Modal backdrop */
.ic-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.6);
	opacity: 0;
	transition: opacity 0.3s ease-in-out;
}

.ic-modal.active {
	opacity: 1;
	display: block;
}

/* Modal content */
.ic-modal-content {
	background-color: #ffffff;
	margin: 5% auto;
	padding: 2rem;
	border-radius: 12px;
	width: 90%;
	max-width: 900px;
	position: relative;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
	transform: translateY(-20px);
	opacity: 0;
	transition: all 0.3s ease-in-out;
}

.ic-modal.active .ic-modal-content {
	transform: translateY(0);
	opacity: 1;
}

/* Close button */
.ic-close {
	position: absolute;
	right: 1.5rem;
	top: 1.5rem;
	color: #666;
	font-size: 24px;
	font-weight: 300;
	line-height: 1;
	padding: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	border-radius: 50%;
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ic-close:hover {
	background-color: #f5f5f5;
	color: #333;
	transform: rotate(90deg);
}

/* Theme grid */
.ic-theme-modal {
	display: grid;
	gap: 1.5rem;
	padding: 2rem 0;
	grid-template-columns: repeat(1, 1fr);
}

/* Theme cards */
.ic-theme {
	background-color: #fff;
	border-radius: 10px;
	overflow: hidden;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.ic-theme:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.ic-theme a {
	display: block;
	text-decoration: none;
	color: #333;
}

.ic-theme img {
	width: 100%;
	/*height: 200px;*/
	/*object-fit: cover;*/
	display: block;
}

.ic-theme span {
	padding: 1rem;
	font-size: 1rem;
	font-weight: 500;
	display: block;
	text-align: center;
}

.ic-loader {
	z-index: 999;
	display: none;
	width: 50px;
	aspect-ratio: 1;
	border-radius: 50%;
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	border: 8px solid #2f7798;
	animation: l20-1 0.8s infinite linear alternate, l20-2 1.6s infinite linear;
}
@keyframes l20-1 {
	0% {
		clip-path: polygon(50% 50%, 0 0, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%);
	}
	12.5% {
		clip-path: polygon(
			50% 50%,
			0 0,
			50% 0%,
			100% 0%,
			100% 0%,
			100% 0%,
			100% 0%
		);
	}
	25% {
		clip-path: polygon(
			50% 50%,
			0 0,
			50% 0%,
			100% 0%,
			100% 100%,
			100% 100%,
			100% 100%
		);
	}
	50% {
		clip-path: polygon(
			50% 50%,
			0 0,
			50% 0%,
			100% 0%,
			100% 100%,
			50% 100%,
			0% 100%
		);
	}
	62.5% {
		clip-path: polygon(
			50% 50%,
			100% 0,
			100% 0%,
			100% 0%,
			100% 100%,
			50% 100%,
			0% 100%
		);
	}
	75% {
		clip-path: polygon(
			50% 50%,
			100% 100%,
			100% 100%,
			100% 100%,
			100% 100%,
			50% 100%,
			0% 100%
		);
	}
	100% {
		clip-path: polygon(
			50% 50%,
			50% 100%,
			50% 100%,
			50% 100%,
			50% 100%,
			50% 100%,
			0% 100%
		);
	}
}
@keyframes l20-2 {
	0% {
		transform: translate(-50%, -50%) scaleY(1) rotate(0deg);
	}
	49.99% {
		transform: translate(-50%, -50%) scaleY(1) rotate(135deg);
	}
	50% {
		transform: translate(-50%, -50%) scaleY(-1) rotate(0deg);
	}
	100% {
		transform: translate(-50%, -50%) scaleY(-1) rotate(-135deg);
	}
}

@media (min-width: 600px) {
	.ic-theme-modal {
		grid-template-columns: repeat(2, 1fr);
	}

	.ic-modal-content {
		margin: 8% auto;
	}
}

@media (min-width: 900px) {
	.ic-theme-modal {
		grid-template-columns: repeat(3, 1fr);
	}

	.ic-modal-content {
		margin: 5% auto;
	}
}

body.modal-open {
	overflow: hidden;
}

.thumbnail-container {
	display: flex;
	gap: 12px;
	margin-bottom: 10px;
}
.thumbnail-container .buttons {
	display: flex;
	gap: 6px;
	justify-content: center;
}

.thumbnail-preview {
	display: flex;
	justify-content: center;
}

.thumbnail-preview .preview-img {
	max-height: 150px;
	max-width: 150px;
	object-fit: contain;
	border-radius: 5px;
	border: 1px solid #787c7d !important;
	margin-bottom: 6px;
}

.cropper-container img {
    transition: none !important;
}