@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Cookie&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap);
@import url(https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap);

.intlwemo-banner-configurator {
	max-width: 720px;
	margin-top: 2rem;

	h2,
	h3 {
		font-size: 1.5rem;
		margin-bottom: 1.5rem;
	}

	.wm-form {
		display: flex;
		flex-direction: column;
		gap: 1.25rem;
		margin-bottom: 2rem;

		label {
			display: flex;
			flex-direction: column;
			font-weight: 500;
		}
	}

	.intlwemo-form-row {
		display: flex;
		align-items: flex-start;
		flex-wrap: wrap;
		margin-top: 1rem;
		gap: 1.5rem;
		justify-content: space-between;

		label {
			flex: 1 1 15px; // min width, but grows
		}

		&.row-wide label:last-child {
			flex: 2 1 60%; // last one stretches more
		}

		.status-message {
			line-height: 2.15384615;
			min-height: 30px;
			font-size: 0.875rem;
			color: #4caf50; // green

			&.status-error {
				color: #f44336; // red
			}

			&.status-loading {
				color: #ff9800; // orange
			}
		}

		.reset-button {
			margin-top: 20px;
			padding-top: 10px;
			line-height: 2.15384615;
			min-height: 30px;
		}
	}

	.intlwemo-gradient-container {
		border-top-left-radius: 0.5rem;
		border-top-right-radius: 0.5rem;
		position: relative;
		overflow: hidden;
		padding: 15px;

		// Your content
		>* {
			position: relative;
			z-index: 1;
		}

		// Left-to-right gradient overlay
		&::before,
		&::after {
			content: "";
			position: absolute;
			top: 0;
			bottom: 0;
			width: 70%; // adjust width as needed
			z-index: 0;
			pointer-events: none;
		}

		&::before {
			left: 0;
			background: linear-gradient(to right, rgb(76, 163, 234), rgba(255, 255, 255, 0));
		}

		&::after {
			right: 0;
			background: linear-gradient(to left, rgb(86, 190, 194), rgba(255, 255, 255, 0));
		}
	}

	.main-controls {

		position: relative;
		display: flex;
		justify-content: space-between;

		&::before,
		&::after {
			content: "";
			position: absolute;
			top: 0;
			bottom: 0;
			width: 70%; // adjust width as needed
			z-index: 0;
			pointer-events: none;
		}

		&::before {
			left: 0;
		}

		&::after {
			right: 0;
		}

		&__left {
			display: flex;
		}

		&__right {
			display: flex;
			align-items: center;
			max-width: 9rem; // max-w-36
			width: 8rem; // w-32
			margin-right: 0.75rem; // mr-3
		}

		.color-picker {
			display: flex;
			position: relative;

			&__presets {
				display: flex;
				padding: 0.75rem;
			}

			&__swatch {
				display: flex;
				height: 2.5rem;
				width: 2.5rem;
				margin: 0.5rem 0.25rem;
				border: 1px solid #f2f2f2;
				border-radius: 9999px;
				cursor: pointer;
				justify-content: center;
				align-items: center;
			}

			&__check {
				max-height: 6rem;
				margin: 0 auto;
			}

			&__custom {
				display: flex;
				flex-direction: column;
			}

			&__custom-trigger {
				display: flex;
				height: 2.5rem;
				width: 2.5rem;
				margin: 0.5rem 0.25rem;
				background-color: #fff;
				border: 1px solid #f2f2f2;
				border-radius: 9999px;
				cursor: pointer;
				justify-content: center;
				align-items: center;
			}

			&__custom-icon {
				max-height: 6rem;
				margin: 0 auto;
			}

			&__popover {
				position: absolute;
				top: -10.5rem;
				left: 2rem;
				border: 1px solid #cbd5e0;
				padding: 0.5rem;
				background-color: #e5e7eb;
				border-radius: 0.5rem;
				z-index: 10;
				display: none;

				&.show {
					display: flex;
					flex-direction: column;
				}
			}

			&__input-wrapper {
				display: flex;
				align-items: center;
				justify-content: center;
				padding: 0.5rem;
				background-color: #fff;
				border-top: 1px solid #d1d5db;
			}

			&__hash {
				color: #4b5563;
				margin-right: 0.5rem;
			}

			&__input {
				width: 6rem;
				padding: 0.25rem 0.5rem;
				font-size: 0.875rem;
				border: 1px solid #d1d5db;
				border-radius: 0.375rem;
				outline: none;

				&:focus {
					border-color: #3b82f6;
				}
			}
		}

	}

	.bg-gradient-green {
		background: linear-gradient(to right, #3ab54a, #6bcf8c);
	}

	.bg-gradient-purple {
		background: linear-gradient(to right, #7f00ff, #e100ff);
	}


	// Optional: mimic Tailwind's "hidden" class if you use it with cx()
	.hidden {
		display: none !important;
	}

	.intlwemo-banner-preview-button {
		display: flex;
		justify-content: flex-end;
		margin-top: 1.25rem; // -mt-5
		margin-bottom: 0.25rem; // mb-1
		cursor: pointer;

	}

	.intlwemo-banner-container {
		display: flex;
		min-height: 14rem;

		&.bottom {
			align-items: flex-end;

			.intlwemo-banner-preview {

				&.animation {
					animation: slideUp 3s ease-in-out;
				}
			}

		}

		&.top {
			align-items: flex-start;

			.intlwemo-banner-preview {

				&.animation {
					animation: slideDown 3s ease-in-out;
				}
			}
		}

	}

	.intlwemo-banner-preview {
		padding: 1rem 1.5rem;
		margin-top: 1rem;
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
		width: 100vw;
		max-width: 100%;
		overflow: hidden;

		&.rounded {
			border-radius: 0.375rem;
		}


		strong {
			display: block;
			font-size: 1.2rem;
			margin-bottom: 0.5rem;
		}

		small {
			display: block;
			margin-top: 0.5rem;
			font-size: 0.85rem;
			opacity: 0.85;
		}

		._intlwemo_link,
		._intlwemo_link a {
			display: flex;
			color: inherit;
		}
	}

	.font-size-picker {
		display: flex;
		flex-direction: column;
		position: relative;

		&.has-label {
			margin-top: 0;
		}

		.label {
			width: 100%;
			margin-bottom: 1px; // Equivalent to mb-px
		}

		.picker-container {
			position: relative;
			width: 100%;
			cursor: default;
			overflow: hidden;
			background-color: #fff;
			text-align: left;
			outline: none;
			display: flex;
			align-items: center; // Equivalent to content-center
			border: 1px solid #8c8f94;
			border-radius: 0.5rem;
			font-size: 0.875rem;
			height: 1.75rem;

			&:focus-within {
				outline: none;
			}
		}

		.font-button {
			color: #000 !important;
			padding-left: 0.5rem !important; // !px-2
			padding-right: 0.5rem !important;

			&:hover {
				font-weight: 700;
			}
		}
	}

	.button {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: fit-content;
		border-radius: 0.375rem;
		padding: 0.25rem 0.75rem;
		margin: auto;
		border: 1px solid #3ab54a;
		font-size: 0.875rem;
		cursor: pointer;
		outline: none;
		min-height: 23px;
		height: 23px;

		&:disabled {
			cursor: not-allowed;
			background-color: #e5e5e5; // mercury
			color: #6b7280; // gray-500
		}

		&--default {
			background-color: #fff;

			&:hover {
				background: linear-gradient(to right, #3ab54a, #6bcf8c); // wm-green to wm-green-fade
			}
		}

		&--reset {
			background-color: #fff;

			&:hover {
				background: linear-gradient(to right, #5c2d91, #7f7fff); // wm-purple to custom
				color: #fff;
			}
		}

		&--danger {
			background-color: #ef4444; // red-500
			color: #fff;
			box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

			&:hover {
				background-color: #dc2626; // red-600
			}

			&:disabled {
				background-color: #fecaca; // red-200
			}
		}

		&--icon {
			background-color: #fff;
			aspect-ratio: 1 / 1;
			max-width: 30px;
			box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);

			&:disabled,
			&:disabled:hover {
				background-color: #e5e5e5;
			}

			&:enabled:hover {
				background: linear-gradient(to right, #3ab54a, #6bcf8c);
			}
		}

		&--invisible {
			padding: 0 0.25rem; // px-1
			border: none;
			background-color: #fff;
		}

		&--sm {
			padding: 0.25rem 0.5rem; // px-2 py-1
		}

	}

	.select-control-wrapper {
		z-index: 1;

		.intlwemo-select-control {
			background-color: #fff;
		}
	}
}

.intlwemo-banner-preview.pill {
	border-radius: 1rem;
}

.intlwemo-banner-preview.none {
	border-radius: 0;
}

@keyframes slideUp {

	0% {
		max-height: 0;
		bottom: -40px;
	}

	100% {
		max-height: 300px;
		bottom: 0;
	}
}

@keyframes slideDown {

	0% {
		max-height: 0;
		top: -40px;
	}

	100% {
		max-height: 300px;
		top: 0;
	}
}
