/* assets/css/coupon.css */

:root {
	--adn-accent: #c9860f;
	--adn-accent-dark: #a86f0c;
	--adn-ink: #1f1a12;
	--adn-muted: #6b6154;
	--adn-border: #ece4d3;
	--adn-surface: #fffdf8;
}

.adn-coupon-card {
	box-sizing: border-box;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	background: var( --adn-surface );
	border: 1px solid var( --adn-border );
	border-radius: 14px;
	box-shadow: 0 2px 10px rgba( 31, 26, 18, 0.06 );
	overflow: hidden;
	margin: 24px 0;
	max-width: 100%;
}

.adn-coupon-card * {
	box-sizing: border-box;
}

.adn-coupon-media {
	position: relative;
	flex: 0 0 220px;
	max-width: 220px;
	aspect-ratio: 1 / 1;
	align-self: flex-start;
	background: #f3ecd9;
}

.adn-coupon-image {
	display: block;
	width: 100%;
	height: 100%;
}

.adn-coupon-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.adn-coupon-content {
	flex: 1 1 280px;
	min-width: 0;
	padding: 22px 26px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.adn-coupon-title {
	margin: 0;
	font-size: 1.2em;
	font-weight: 700;
	line-height: 1.35;
	color: var( --adn-ink );
}

.adn-coupon-discount-inline {
	display: inline-block;
	align-self: flex-start;
	background: color-mix( in srgb, var( --adn-accent ) 14%, transparent );
	color: var( --adn-accent-dark );
	font-weight: 700;
	font-size: 0.78em;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	padding: 5px 11px;
	border-radius: 999px;
}

.adn-coupon-description {
	margin: 0;
	font-size: 0.92em;
	line-height: 1.55;
	color: var( --adn-muted );
	overflow-wrap: break-word;
}

.adn-coupon-description p {
	margin: 0 0 0.6em;
}

.adn-coupon-description p:last-child {
	margin-bottom: 0;
}

.adn-coupon-footer {
	margin-top: auto;
	padding-top: 14px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-top: 1px solid var( --adn-border );
}

.adn-coupon-action {
	min-width: 0;
}

.adn-coupon-code,
.adn-coupon-deal-btn,
.adn-coupon-reveal-btn {
	display: inline-block;
	max-width: 100%;
	background: var( --adn-accent );
	border: none;
	border-radius: 8px;
	padding: 12px 22px;
	font-weight: 700;
	font-size: 1em;
	line-height: 1.2;
	cursor: pointer;
	color: #fff;
	text-decoration: none;
	text-align: center;
	overflow-wrap: break-word;
	transition: background-color 0.15s ease;
}

.adn-coupon-code:hover,
.adn-coupon-deal-btn:hover,
.adn-coupon-reveal-btn:hover:not(:disabled) {
	background: var( --adn-accent-dark );
}

.adn-coupon-reveal-btn:disabled {
	opacity: 0.7;
	cursor: default;
}

.adn-coupon-exhausted {
	display: inline-block;
	padding: 10px 4px;
	color: #a14b3f;
	font-weight: 600;
	font-size: 0.95em;
}

.adn-coupon-expiration {
	flex: 0 0 auto;
	font-size: 0.82em;
	color: var( --adn-muted );
	text-align: right;
}

.adn-coupon-code.adn-copied::after {
	content: " ✓ Copiato";
	color: #2e7d32;
	font-size: 0.8em;
	font-weight: 600;
}

/* Below ~640px, stack the image above the content instead of side by side.
   It keeps its 1:1 aspect ratio — full width, height follows automatically. */
@media ( max-width: 640px ) {
	.adn-coupon-media {
		flex-basis: 100%;
		max-width: 100%;
	}
}

/* Below ~480px (a typical phone in portrait), give the CTA and footer more
   breathing room and full-width tap targets. */
@media ( max-width: 480px ) {
	.adn-coupon-content {
		padding: 18px 18px 20px;
	}

	.adn-coupon-footer {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}

	.adn-coupon-expiration {
		text-align: center;
	}

	.adn-coupon-code,
	.adn-coupon-deal-btn,
	.adn-coupon-reveal-btn {
		display: block;
		width: 100%;
		padding: 14px 16px;
	}
}
