/* =============================================================================
   Tokyo Trip Guide — Promo Banner
   Scoped under .ttu-promo-banner. No dark mode (per theme convention).
   ============================================================================= */

/* ── Root ─────────────────────────────────────────────────────────────────── */

.ttu-promo-banner {
	--promo-brand-color:       #ff5722;
	--promo-brand-color-hover: #e64a19;

	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 9999;
	font-family: var(--sans, 'Plus Jakarta Sans', sans-serif);
	color: var(--ink, #1a1714);
	background: var(--p, #ede7da);
	border-top: 3px solid var(--promo-brand-color);
	box-shadow: 0 -4px 28px rgba(0,0,0,.13);

	transform: translateY(100%);
	transition: transform .35s cubic-bezier(.22,.61,.36,1);
}

.ttu-promo-banner--visible {
	transform: translateY(0);
}

.ttu-promo-banner--dismissing {
	opacity: 0;
	transform: translateY(100%);
	transition: opacity .2s ease, transform .2s ease;
}

/* ── Inner — single row on desktop ───────────────────────────────────────── */

.ttu-promo-banner__inner {
	display: flex;
	align-items: center;
	flex-wrap: nowrap;
	gap: 14px;
	padding: 10px 20px;
	max-width: 1280px;
	margin: 0 auto;
	min-height: 58px;
}

/* Row-break element: hidden on desktop */
.ttu-promo-banner__break {
	display: none;
}

/* ── Brand icon ───────────────────────────────────────────────────────────── */

.ttu-promo-banner__brand {
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	background: #fff;
	border-radius: 9px;
	border: 1px solid rgba(0,0,0,.08);
	box-shadow: 0 1px 4px rgba(0,0,0,.07);
}

.ttu-promo-banner__brand-icon {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: contain;
}

/* ── Text content ─────────────────────────────────────────────────────────── */

.ttu-promo-banner__content {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 1;
	min-width: 0;
}

.ttu-promo-banner__label {
	font-weight: 800;
	font-size: 1.5rem;
	color: var(--promo-brand-color);
	white-space: nowrap;
	letter-spacing: -.01em;
}

.ttu-promo-banner__description {
	font-size: 1rem;
	font-weight: 500;
	opacity: .6;
	white-space: nowrap;
}

.ttu-promo-banner__description::before {
	content: '—';
	margin-right: 5px;
	opacity: .5;
}

.ttu-promo-banner__expiry {
	font-size: .8rem;
    opacity: 1;
    white-space: nowrap;
    color: var(--r);
    font-weight: bold;
    padding: 5px 0 0;
}

.ttu-promo-banner__expiry::before {
	content: '•';
	margin: 0 5px;
}

/* ── Promo code chip ──────────────────────────────────────────────────────── */

.ttu-promo-banner__code-wrap {
	flex-shrink: 0;
	margin-bottom: 3px!important;
}

.ttu-promo-banner__code {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	padding: 6px 14px 7px;
	background: rgba(255,255,255,.9);
	border: 2px dashed rgba(0,0,0,.2);
	border-radius: 7px;
	cursor: pointer;
	color: var(--ink, #1a1714);
	transition: border-color .15s, box-shadow .15s, background .15s;
	position: relative;
	box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.ttu-promo-banner__code:hover {
	border-color: var(--promo-brand-color);
	background: #fff;
	box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.ttu-promo-banner__code-label {
	font-size: .6rem;
	font-weight: 800;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--promo-brand-color);
	line-height: 1;
	opacity: .75;
}

.ttu-promo-banner__code-inner {
	display: flex;
	align-items: center;
	gap: 7px;
	line-height: 1;
}

.ttu-promo-banner__code-text {
	font-family: 'SFMono-Regular', Menlo, Consolas, monospace;
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--ink, #1a1714);
}

.ttu-promo-banner__code-copy-icon {
	color: var(--promo-brand-color);
	opacity: .7;
	display: flex;
	align-items: center;
}

.ttu-promo-banner__code-copied {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--promo-brand-color);
	color: #fff;
	border-radius: 5px;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .04em;
	opacity: 0;
	pointer-events: none;
	transition: opacity .15s;
}

.ttu-promo-banner__code.is-copied .ttu-promo-banner__code-label,
.ttu-promo-banner__code.is-copied .ttu-promo-banner__code-inner {
	opacity: 0;
}

.ttu-promo-banner__code.is-copied .ttu-promo-banner__code-copied {
	opacity: 1;
}

/* ── CTA button ───────────────────────────────────────────────────────────── */

.ttu-promo-banner__cta {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 10px 20px;
	background: var(--promo-brand-color);
	color: #fff;
	font-weight: 700;
	font-size: .875rem;
	letter-spacing: -.01em;
	text-decoration: none;
	border-radius: 7px;
	flex-shrink: 0;
	transition: background .15s, transform .1s, box-shadow .15s;
	white-space: nowrap;
	box-shadow: 0 2px 10px rgba(0,0,0,.18);
}

.ttu-promo-banner__cta:hover {
	background: var(--promo-brand-color-hover);
	color: #fff;
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(0,0,0,.22);
}

.ttu-promo-banner__cta:active {
	transform: translateY(0);
	box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

/* ── Controls ─────────────────────────────────────────────────────────────── */

.ttu-promo-banner__controls {
	display: flex;
	align-items: center;
	gap: 2px;
	padding-left: 12px;
	border-left: 1px solid rgba(0,0,0,.12);
	flex-shrink: 0;
}

.ttu-promo-banner__hide,
.ttu-promo-banner__dismiss {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	background: transparent;
	border: none;
	border-radius: 5px;
	cursor: pointer;
	color: var(--ink, #1a1714);
	opacity: .35;
	transition: opacity .15s, background .15s;
	padding: 0;
}

.ttu-promo-banner__hide:hover,
.ttu-promo-banner__dismiss:hover {
	opacity: .75;
	background: rgba(0,0,0,.07);
}

/* ── Hidden / collapsed tab ───────────────────────────────────────────────── */

.ttu-promo-banner__tab {
	display: none;
}

.ttu-promo-banner--hidden .ttu-promo-banner__inner {
	display: none;
}

.ttu-promo-banner--hidden {
	left: 24px;
	right: auto;
	bottom: 0;
	width: auto;
	border-top: 3px solid var(--promo-brand-color);
	border-left: 1px solid rgba(0,0,0,.1);
	border-right: 1px solid rgba(0,0,0,.1);
	border-radius: 8px 8px 0 0;
	box-shadow: -2px -2px 16px rgba(0,0,0,.10);
	transform: translateY(0);
}

.ttu-promo-banner--hidden .ttu-promo-banner__tab {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	cursor: pointer;
	font-size: .8125rem;
	font-weight: 600;
	white-space: nowrap;
	user-select: none;
}

.ttu-promo-banner--hidden .ttu-promo-banner__tab:hover {
	background: rgba(0,0,0,.04);
	border-radius: 0 0 8px 8px;
}

.ttu-promo-banner--hidden .ttu-promo-banner__tab img {
	display: block;
	background: #fff;
	border-radius: 5px;
	padding: 2px;
	box-sizing: border-box;
	border: 1px solid rgba(0,0,0,.06);
}

/* ── Responsive: tablet (≤ 900px) ────────────────────────────────────────── */

@media (max-width: 900px) {
	.ttu-promo-banner__expiry {
		display: none;
	}
}

/* ── Responsive: mobile (≤ 600px) — two-row card layout ─────────────────── */

@media (max-width: 600px) {
	.ttu-promo-banner {
		/* Slight rounding on top corners gives it a card feel */
		border-radius: 12px 12px 0 0;
	}

	.ttu-promo-banner__inner {
		/* Switch to wrapping two-row layout */
		flex-wrap: wrap;
		gap: 0;
		padding: 11px 14px 11px;
		min-height: auto;
		align-items: center;
	}

	/* ── Row 1: icon + promo info ── */

	.ttu-promo-banner__brand {
		width: 32px;
		height: 32px;
		border-radius: 7px;
		margin-right: 10px;
		flex-shrink: 0;
	}

	.ttu-promo-banner__brand-icon {
		width: 20px;
		height: 20px;
	}

	.ttu-promo-banner__content {
		flex: 1;
		min-width: 0;
		/* Stack label above description so long text wraps cleanly */
		flex-direction: column;
		align-items: flex-start;
		gap: 2px;
	}

	.ttu-promo-banner__label {
		font-size: .9375rem;
		white-space: nowrap; /* label stays on one line */
		margin-top: 1rem;
	}

	/* Description wraps freely on mobile */
	.ttu-promo-banner__description {
		display: block;
		white-space: normal;
		word-break: break-word;
		font-size: .75rem;
		line-height: 1.3;
	}

	.ttu-promo-banner__description::before {
		content: none; /* em-dash before looks odd when description is on its own line */
	}

	/* Hide expiry — description already gives context */
	.ttu-promo-banner__expiry {
		display: none;
	}

	/* ── Row break: thin divider between rows ── */

	.ttu-promo-banner__break {
		display: block;
		flex-basis: 100%;
		height: 1px;
		background: rgba(0,0,0,.09);
		margin: 9px 0 9px;
	}

	/* ── Row 2: code chip (dominant) + CTA (compact) + toggle ── */

	/* Code chip fills available space — it's the primary action */
	.ttu-promo-banner__code-wrap {
		flex: 1;
		margin-left: 0;
	}

	.ttu-promo-banner__code {
		width: 100%;
		box-sizing: border-box;
		padding: 7px 14px 8px;
		border-radius: 7px;
		align-items: center; /* centre content since it fills width */
		gap: 3px;
	}

	/* Show "USE CODE" eyebrow on mobile — chip is large enough */
	.ttu-promo-banner__code-label {
		display: block;
		font-size: .58rem;
	}

	.ttu-promo-banner__code-text {
		font-size: 1rem;
		letter-spacing: .07em;
	}

	/* CTA is compact — code chip is the star on mobile */
	.ttu-promo-banner__cta {
		flex: none;
		flex-shrink: 0;
		margin-left: 8px;
		padding: 10px 14px;
		font-size: .8125rem;
		border-radius: 8px;
		gap: 5px;
		white-space: nowrap;
	}

	/* When there is no code chip, CTA fills the full row instead */
	.ttu-promo-banner__break + .ttu-promo-banner__cta {
		flex: 1;
		justify-content: center;
		margin-left: 0;
	}

	/* Controls: no border, tighter */
	.ttu-promo-banner__controls {
		border-left: none;
		padding-left: 6px;
		margin-left: 4px;
	}

	/* On mobile: hide dismisses permanently — show toggle (↓) instead
	   so readers can re-open the banner later to claim the promo */
	.ttu-promo-banner__dismiss {
		display: none;
	}

	.ttu-promo-banner__hide {
		display: flex;
		width: 30px;
		height: 30px;
		opacity: .4;
	}
}
