/**
 * Step 3 Card style pills + Step 4 (delivery) UI styles.
 * Loaded only on the front page where the stepped generator lives.
 *
 * Design tokens come from generator-v2.css / main.css. This file only adds
 * the new components — no overrides to existing classes.
 */

/* ============================================================
   Card style pills (Step 3, between recipient and length)
   ============================================================ */
.genv2-styles {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.6rem;
	margin-top: 0.4rem;
}
.genv2-style-btn {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	text-align: left;
	gap: 0.55rem;
	padding: 0.55rem;
	border: 1.5px solid rgba(178, 178, 174, 0.4);
	border-radius: 16px;
	background: #fff;
	cursor: pointer;
	transition: border-color .2s, box-shadow .2s, transform .15s;
	font: inherit;
}
.genv2-style-btn:hover {
	border-color: var(--color-primary, #6050b0);
	transform: translateY(-1px);
}
.genv2-style-btn.active {
	border-color: var(--color-primary, #6050b0);
	box-shadow: 0 0 0 3px rgba(96, 80, 176, .14), 0 6px 18px -10px rgba(96, 80, 176, .35);
}
.genv2-style-thumb {
	display: block;
	width: 100%;
	aspect-ratio: 9 / 3;
	border-radius: 10px;
	background: #f0eaea;
	position: relative;
	overflow: hidden;
}
.genv2-style-thumb--aurora {
	background: radial-gradient(120% 80% at 50% 0%, #8B7AC8 0%, #6050B0 55%, #3d3380 100%);
}
.genv2-style-thumb--aurora::after {
	content: "💌";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-size: 1.5rem;
	background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.25) 0, transparent 60%);
}
.genv2-style-thumb--postcard {
	background: linear-gradient(135deg, #FFC369 0%, #ff9eb1 50%, #A898FF 100%);
}
.genv2-style-thumb--postcard::after {
	content: "💛";
	position: absolute;
	top: 6px; right: 6px;
	font-size: 0.95rem;
}
.genv2-style-thumb--seal {
	background: #f4ead8;
	border: 1px solid #e6d8b9;
}
.genv2-style-thumb--seal::after {
	content: "S";
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	font-family: 'Fraunces', Georgia, serif;
	font-style: italic;
	font-weight: 600;
	color: #f4ead8;
	background: radial-gradient(circle at 50% 50%, #9a4a36 0 22%, transparent 22%);
	font-size: 1.3rem;
}
.genv2-style-meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 0 0.2rem 0.2rem;
}
.genv2-style-name {
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--color-text-dark, #313330);
}
.genv2-style-desc {
	font-size: 0.78rem;
	color: var(--color-text-muted, #5e5f5c);
	line-height: 1.35;
}

/* ============================================================
   Step 4 — DELIVERY
   ============================================================ */

.genv2-step--delivery .genv2-step-sub {
	color: var(--color-text-muted, #5e5f5c);
	font-size: 0.92rem;
	margin-top: 0.35rem;
	line-height: 1.5;
}

/* Send-now / Schedule toggle */
.genv2-mode {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.2rem;
}
.genv2-mode-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.7rem 0.9rem;
	border: 1.5px solid rgba(178, 178, 174, 0.4);
	border-radius: 14px;
	background: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 0.92rem;
	color: var(--color-text-dark, #313330);
	cursor: pointer;
	transition: border-color .2s, color .2s, box-shadow .2s;
}
.genv2-mode-btn:hover {
	border-color: var(--color-primary, #6050b0);
	color: var(--color-primary, #6050b0);
}
.genv2-mode-btn.active {
	border-color: var(--color-primary, #6050b0);
	color: var(--color-primary, #6050b0);
	background: rgba(196, 184, 255, 0.16);
}

/* When row */
.genv2-when {
	margin-bottom: 1.2rem;
}
.genv2-when[hidden] { display: none; }
.genv2-when-row {
	display: grid;
	grid-template-columns: 2fr 1fr;
	gap: 0.6rem;
	margin-bottom: 0.7rem;
}
.genv2-input--date,
.genv2-input--time {
	font: inherit;
	font-size: 0.95rem;
	padding: 0.7rem 0.8rem;
	border: 1.5px solid rgba(178, 178, 174, 0.4);
	border-radius: 12px;
	background: #fff;
	color: var(--color-text-dark, #313330);
}
.genv2-input--date:focus,
.genv2-input--time:focus {
	outline: none;
	border-color: var(--color-primary, #6050b0);
	box-shadow: 0 0 0 3px rgba(96, 80, 176, 0.18);
}
.genv2-time-quick {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
}
.genv2-time-chip {
	font: inherit;
	font-size: 0.82rem;
	font-weight: 500;
	padding: 0.42rem 0.85rem;
	border-radius: 999px;
	border: 1px solid rgba(178, 178, 174, 0.4);
	background: #fff;
	color: var(--color-text-muted, #5e5f5c);
	cursor: pointer;
	transition: border-color .2s, color .2s, background .2s;
}
.genv2-time-chip:hover { border-color: var(--color-primary, #6050b0); color: var(--color-primary, #6050b0); }
.genv2-time-chip.active {
	background: var(--color-primary, #6050b0);
	color: #fff;
	border-color: var(--color-primary, #6050b0);
}
.genv2-tz {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin-top: 0.65rem;
	color: var(--color-text-muted, #5e5f5c);
	font-size: 0.82rem;
}
.genv2-tz svg { flex: 0 0 14px; }
.genv2-tz strong { color: var(--color-text-dark, #313330); font-weight: 600; }

.air-datepicker {
	--adp-font-family: var(--font-primary, Inter, system-ui, sans-serif);
	--adp-z-index: 1000102;
	--adp-width: 290px;
	--adp-border-radius: 12px;
	--adp-border-color: rgba(96, 80, 176, 0.2);
	--adp-border-color-inner: rgba(178, 178, 174, 0.22);
	--adp-accent-color: var(--color-primary, #6050b0);
	--adp-color-current-date: var(--color-primary, #6050b0);
	--adp-cell-background-color-selected: var(--color-primary, #6050b0);
	--adp-cell-background-color-selected-hover: #51449d;
	--adp-btn-color: var(--color-primary, #6050b0);
	box-shadow: 0 18px 48px rgba(49, 51, 48, 0.18);
}
.air-datepicker-overlay { --adp-overlay-z-index: 1000101; }
.air-datepicker-time--current-hours,
.air-datepicker-time--current-minutes {
	font-family: var(--font-primary, Inter, system-ui, sans-serif);
}
.air-datepicker.-only-timepicker- {
	--adp-width: 260px;
}

/* Channels grid — compact 4-in-a-row tiles. Was an auto-fill grid with
 * large 150px-min tiles; user wanted the same compact icon-row pattern as
 * the auth/login picker (4 small icons, name underneath, no description).
 */
.genv2-channels {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 0.5rem;
	margin-top: 0.4rem;
}
.genv2-channel {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	padding: 0.55rem 0.35rem 0.5rem;
	border: 1.5px solid rgba(178, 178, 174, 0.4);
	border-radius: 12px;
	background: #fff;
	cursor: pointer;
	font: inherit;
	transition: border-color .2s, box-shadow .2s, transform .15s;
	text-align: center;
}
.genv2-channel:hover { border-color: var(--color-primary, #6050b0); transform: translateY(-1px); }
.genv2-channel.active {
	border-color: var(--color-primary, #6050b0);
	box-shadow: 0 0 0 3px rgba(96, 80, 176, .14);
	background: rgba(196, 184, 255, .12);
}
.genv2-channel-check {
	position: absolute;
	top: 5px; right: 5px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--color-primary, #6050b0);
	color: #fff;
	display: grid;
	place-items: center;
	opacity: 0;
	transform: scale(0.7);
	transition: opacity .18s, transform .18s;
}
.genv2-channel-check svg { width: 11px; height: 11px; display: block; }
.genv2-channel.active .genv2-channel-check { opacity: 1; transform: scale(1); }
.genv2-channel-icon {
	width: 30px;
	height: 30px;
	border-radius: 10px;
	display: grid;
	place-items: center;
	background: #f6f5f1;
	color: #313330;
}
.genv2-channel-icon svg { width: 18px; height: 18px; display: block; }
.genv2-channel-icon--email     { color: #6050b0; }
.genv2-channel-icon--telegram  { color: #2AABEE; }
.genv2-channel-icon--whatsapp  { color: #25D366; }
.genv2-channel-icon--sms       { color: #6050b0; }
.genv2-channel-icon--viber     { color: #7360F2; }
.genv2-channel-icon--messenger { color: #0084FF; }
.genv2-channel-icon--instagram { color: #E4405F; }

.genv2-channel-name {
	font-weight: 600;
	font-size: 0.78rem;
	color: var(--color-text-dark, #313330);
	line-height: 1.15;
}
/* Tile meta line ("Link", "Up to 10 phone numbers", etc.) is too noisy in
 * the compact tile — hidden on desktop. Kept visible on mobile where the
 * grid drops to 2 columns and there's room.
 */
.genv2-channel-meta {
	display: none;
	font-size: 0.7rem;
	color: var(--color-text-muted, #5e5f5c);
	line-height: 1.3;
}

/* Coming-soon channel — disabled */
.genv2-channel--soon {
	opacity: 0.55;
	cursor: not-allowed;
	filter: saturate(0.7);
}
.genv2-channel--soon:hover {
	border-color: rgba(178, 178, 174, 0.4);
	transform: none;
}

/* Step 4 footer with Back + final submit on a single row.
   Back stays compact; the primary CTA absorbs the remaining width. */
.genv2-step-nav--final {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.6rem;
	align-items: stretch;
	margin-top: 1.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--v2-border);
}
/* Both children share the same row height: grid stretches them, and any
   internal height override on .genv2-btn-outline / .btn-full-width is
   neutralised by `height: 100%`. Padding stays as the type rules dictate
   so the visual weight matches each button's role. */
.genv2-step-nav--final > * {
	height: 100%;
	min-height: 56px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	margin: 0;
}
.genv2-step-nav--final [data-step-prev] {
	min-width: 96px;
}
.genv2-btn--compact { padding-left: 0.9rem; padding-right: 0.9rem; }

/* Manage my Wishes block in the right column — hidden until /generate succeeds.
   Reuses the primary CTA styling (.genv2-result-cta) so it visually matches
   the Send Now button on the left. */
.genv2-result-manage[hidden] { display: none; }
.genv2-result-manage { margin-top: 1rem; }
.genv2-manage-link {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	line-height: 1;
}
.genv2-manage-link:hover { text-decoration: none; }
.genv2-manage-link svg { flex: 0 0 auto; }

/* Per-channel contact inputs */
.genv2-contacts {
	margin-top: 0.6rem;
}
.genv2-contact[hidden] { display: none; }
.delivery-email-list,
.genv2-email-list,
.delivery-phone-list,
.genv2-phone-list {
	display: grid;
	gap: 0.5rem;
}
.delivery-email-row,
.genv2-email-row,
.delivery-phone-row,
.genv2-phone-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 24px;
	gap: 0.5rem;
	align-items: center;
}
.delivery-email-remove,
.genv2-email-remove,
.delivery-phone-remove,
.genv2-phone-remove {
	width: 24px;
	height: 24px;
	min-height: 24px;
	padding: 0;
	border: 1.5px solid #d94a42;
	border-radius: 50%;
	background: #fff;
	color: #d94a42;
	cursor: pointer;
	display: inline-grid;
	place-items: center;
	font: inherit;
	font-size: 0.82rem;
	font-weight: 700;
	line-height: 1;
	transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.delivery-email-remove:hover,
.genv2-email-remove:hover,
.delivery-phone-remove:hover,
.genv2-phone-remove:hover {
	background: #d94a42;
	border-color: #d94a42;
	color: #fff;
	box-shadow: 0 0 0 3px rgba(217, 74, 66, 0.14);
}
.delivery-email-remove[hidden],
.genv2-email-remove[hidden],
.delivery-email-add[hidden],
.genv2-email-add[hidden],
.delivery-phone-remove[hidden],
.genv2-phone-remove[hidden],
.delivery-phone-add[hidden],
.genv2-phone-add[hidden] {
	display: none;
}
.delivery-email-add,
.genv2-email-add,
.delivery-phone-add,
.genv2-phone-add {
	margin-top: 0.65rem;
	border: 0;
	background: transparent;
	color: var(--color-primary, #6050b0);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	padding: 0;
}
.delivery-email-add-icon,
.delivery-phone-add-icon {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: inline-grid;
	place-items: center;
	background: var(--color-primary, #6050b0);
	color: #fff;
	font-size: 1rem;
	/* line-height === element height so the "+" glyph centers vertically. */
	line-height: 24px;
}
.genv2-phone-row .iti,
.delivery-phone-row .iti {
	width: 100%;
	min-width: 0;
}
.genv2-phone-row .iti input,
.delivery-phone-row .iti input {
	width: 100%;
}
/* The country dropdown is appended to <body> (dropdownContainer) and the
   body-level child is the `.iti--container` WRAPPER — so the high z-index must
   sit on the wrapper, not only the inner content. Without it the wrapper had
   no z-index on the generator page (its only rule lived in account.css, which
   the homepage doesn't load) and the list rendered behind the live-preview
   card / Send CTA. Keep all three high so the list always floats on top. */
.iti--container,
.iti__dropdown-content,
.iti__country-list {
	z-index: 1000200;
}

/* Summary card */
.genv2-summary {
	margin: 1.2rem 0 0.8rem;
	padding: 0.9rem 1.1rem;
	border-radius: 14px;
	background: rgba(196, 184, 255, 0.18);
	border: 1px solid rgba(96, 80, 176, 0.18);
	color: var(--color-text-dark, #313330);
	font-size: 0.92rem;
	line-height: 1.5;
}
.genv2-summary--empty {
	background: rgba(178, 178, 174, 0.1);
	border-color: rgba(178, 178, 174, 0.25);
	color: var(--color-text-muted, #5e5f5c);
}
.genv2-summary strong { color: var(--color-text-dark, #313330); font-weight: 700; }
.genv2-summary em { font-style: normal; font-weight: 600; color: var(--color-primary, #6050b0); }
.genv2-summary [data-summary-chip] {
	display: inline-block;
	padding: 0.18rem 0.55rem;
	border-radius: 999px;
	background: rgba(96, 80, 176, 0.12);
	cursor: pointer;
	transition: background .2s, color .2s, transform .15s;
}
.genv2-summary [data-summary-chip]:not([aria-disabled="true"]):hover {
	background: var(--color-primary, #6050b0);
	color: #fff;
	transform: translateY(-1px);
}
.genv2-summary [data-summary-chip][aria-disabled="true"] {
	background: rgba(178, 178, 174, 0.14);
	color: var(--color-text-muted, #5e5f5c);
	cursor: not-allowed;
	transform: none;
}
.genv2-summary [data-summary-chip]:focus-visible {
	outline: 2px solid var(--color-primary, #6050b0);
	outline-offset: 2px;
}

/* Validation error slot */
.genv2-deliver-error {
	margin-top: 0.5rem;
	padding: 0.7rem 0.95rem;
	background: #ffeded;
	border: 1px solid #f4c2c2;
	border-radius: 12px;
	color: #8a2222;
	font-size: 0.88rem;
}
.genv2-deliver-error[hidden] { display: none; }

/* Final submit button (Schedule / Send now) */
.genv2-final {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.85rem 1.6rem;
	border: none;
	border-radius: 999px;
	background: var(--color-primary, #6050b0);
	color: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 1rem;
	cursor: pointer;
	box-shadow: 0 8px 22px -8px rgba(96, 80, 176, 0.5);
	transition: background .2s, transform .15s, box-shadow .2s;
}
.genv2-final:hover:not(:disabled) {
	background: var(--color-primary-hover, #5040a0);
	transform: translateY(-1px);
	box-shadow: 0 12px 28px -8px rgba(96, 80, 176, 0.6);
}
.genv2-final:disabled { opacity: 0.5; cursor: not-allowed; box-shadow: none; }
.genv2-final.is-busy { opacity: 0.8; cursor: progress; }

/* Mobile */
@media (max-width: 720px) {
	.genv2-styles { grid-template-columns: 1fr; }
	.genv2-mode { flex-direction: column; }
	.genv2-when-row { grid-template-columns: 1fr; }
	.genv2-channels { grid-template-columns: repeat(2, 1fr); }
}
