/*
 * PROTECTED COUPON UI
 *
 * Do not edit this file unless the user explicitly asks to modify coupon
 * button, reveal, or coupon modal copy styling. It is intentionally loaded
 * after style.css on coupon pages so general theme CSS changes cannot
 * accidentally override the restored coupon design.
 */

.coupon-code {
	display: inline-flex;
	align-items: center;
	min-height: 42px;
	padding: 8px 14px;
	border: 1px dashed var(--improve-accent);
	border-radius: 6px;
	background: #fff5f5;
	color: var(--improve-accent-dark);
	font-weight: 800;
	letter-spacing: 0;
}

.coupon-code--masked {
	min-width: 92px;
	justify-content: center;
}

/* Coupon ticket button */
.coupon-reveal-button {
	position: relative;
	display: inline-flex;
	align-items: stretch;
	width: min(100%, 370px);
	min-width: 0;
	min-height: 64px;
	justify-content: flex-start;
	padding: 0;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: inherit;
	font-size: inherit;
	line-height: 1;
	cursor: pointer;
	overflow: hidden;
	box-shadow: 0 16px 28px rgba(251, 100, 27, 0.18), 0 10px 22px rgba(15, 23, 42, 0.16);
	filter: none;
	isolation: isolate;
}

.coupon-reveal-button::before,
.coupon-reveal-button::after,
.coupon-reveal-button:not(.is-revealed)::before {
	content: none !important;
	display: none !important;
}

.coupon-reveal-button:hover {
	filter: none;
	box-shadow: 0 16px 28px rgba(251, 100, 27, 0.18), 0 10px 22px rgba(15, 23, 42, 0.16);
}

.coupon-reveal-button:hover .coupon-reveal-button__main {
	background: var(--improve-accent);
}

.coupon-reveal-button:hover .coupon-reveal-button__stub {
	background: #111827;
}

.coupon-reveal-button__main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 16px 22px;
	background: var(--improve-accent);
	border-radius: 12px;
	transition: background 0.15s;
}

.coupon-reveal-button.has-discount .coupon-reveal-button__main {
	border-radius: 12px 0 0 12px;
}

.coupon-reveal-button__label {
	color: #fff;
	font-size: clamp(1.15rem, 2vw, 1.45rem);
	font-weight: 800;
	line-height: 1;
	white-space: nowrap;
}

.coupon-reveal-button__stub {
	position: relative;
	flex: 0 0 108px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	width: 108px;
	padding: 16px 12px;
	background: #111827;
	border-radius: 0 12px 12px 0;
	border-left: 2px dashed rgba(255, 255, 255, 0.5);
	transition: background 0.15s;
}

.coupon-reveal-button__stub::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: 34px;
	height: 34px;
	background: linear-gradient(135deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.16));
	border-bottom-left-radius: 26px;
	pointer-events: none;
}

.coupon-reveal-button__discount {
	position: relative;
	z-index: 1;
	color: #fff;
	font-size: clamp(0.78rem, 1vw, 0.95rem);
	font-weight: 900;
	line-height: 1.25;
	text-align: center;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.coupon-reveal-button.is-revealed {
	width: min(100%, 390px);
	cursor: default;
}

.coupon-reveal-button.is-revealed .coupon-reveal-button__main {
	border-radius: 12px;
	background: var(--improve-accent);
	padding: 16px 28px;
}

.coupon-reveal-button.is-revealed:hover .coupon-reveal-button__main {
	background: var(--improve-accent);
}

.coupon-reveal-button.is-revealed .coupon-reveal-button__label {
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.coupon-copy-status {
	width: 100%;
	color: var(--improve-good);
	font-size: 0.92rem;
}

.coupon-inline-code {
	display: grid;
	gap: 12px;
	justify-items: center;
	width: min(100%, 460px);
}

.coupon-inline-code .coupon-modal__code-row {
	width: 100%;
	margin: 0;
}

.coupon-modal__code-row {
	display: flex;
	align-items: stretch;
	width: min(360px, 100%);
	margin: 0 auto;
	border: 2px dashed var(--improve-accent);
	border-radius: 8px;
	background: #fff5f5;
	overflow: hidden;
}

.coupon-modal__code {
	flex: 1;
	min-width: 0;
	padding: 14px 16px;
	color: var(--improve-accent-dark);
	font-weight: 900;
	font-size: 1.05rem;
	text-align: center;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	overflow-wrap: anywhere;
}

.coupon-modal__copy {
	min-width: 112px;
	border: 0;
	border-left: 2px dashed var(--improve-accent);
	background: var(--improve-accent);
	color: #fff;
	font-weight: 850;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	cursor: pointer;
}

.coupon-modal__copy:hover,
.coupon-modal__copy:focus {
	background: var(--improve-accent-dark);
}

.coupon-modal__message {
	margin: 14px 0 0;
	color: var(--improve-good);
	font-weight: 700;
}

html[data-theme="dark"] .coupon-code,
html[data-theme="dark"] .coupon-modal__code-row {
	background: #171c24;
	border-color: var(--improve-accent);
}

html[data-theme="dark"] .coupon-code,
html[data-theme="dark"] .coupon-modal__code {
	color: #ff9b63;
}

html[data-theme="dark"] .coupon-copy-status,
html[data-theme="dark"] .coupon-modal__message {
	color: var(--improve-good);
}

@media (max-width: 640px) {
	.coupon-reveal-button {
		width: min(100%, 320px);
	}

	.coupon-reveal-button__main {
		padding: 16px 16px 16px 22px;
	}

	.coupon-reveal-button__stub {
		flex-basis: 96px;
		width: 96px;
		padding: 16px 10px;
	}

	.coupon-modal__code-row {
		flex-direction: column;
		border-radius: 12px;
	}

	.coupon-modal__code {
		text-align: center;
	}

	.coupon-modal__copy {
		min-height: 44px;
	}
}
