/*
 * Relaunch-Geschenk (functions/commerce/gift-nr72.php) — one slim brand line
 * directly under the header on shop, category, product and cart pages, plus
 * the mini-cart note and the locked gift quantity in the classic cart.
 *
 * Grammar: the header top bar's mono 11px / 1.2px uppercase row on the
 * brand-yellow surface of the announcement banner. Yellow keeps ink text in
 * BOTH themes (brand rule, tokens.css) — nothing to override for dark mode.
 * Sharp corners.
 */

/* ---------- Strip ---------- */
.sisa-gift-strip {
	background: var(--sisa-yellow);
	color: var(--sisa-yellow-ink);
}
.sisa-gift-strip__in {
	max-width: var(--sisa-container);
	margin-inline: auto;
	box-sizing: border-box;
	min-height: 34px;
	padding: 0 var(--sisa-pad);
	display: flex;
	align-items: center;
	justify-content: center;
}
.sisa-gift-strip__link {
	display: inline-block;
	padding: 9px 0;
	font-family: var(--sisa-mono);
	font-size: 11px;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	text-align: center;
	text-wrap: balance;
	color: var(--sisa-yellow-ink);
	text-decoration: none;
}
.sisa-gift-strip__link:hover,
.sisa-gift-strip__link:focus-visible {
	color: var(--sisa-yellow-ink);
}
.sisa-gift-strip__link:hover .sisa-gift-strip__text,
.sisa-gift-strip__link:focus-visible .sisa-gift-strip__text {
	text-decoration: underline;
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}
.sisa-gift-strip__link:focus-visible {
	outline: 2px solid var(--sisa-yellow-ink);
	outline-offset: 2px;
}
/* Unbreakable groups: „1. Oktober", „4× NR-72", „CHF 400." — wraps happen
   between them, never inside. */
.sisa-gift-strip__nb { white-space: nowrap; }
/* The arrow rides on the last group, so it can never strand on its own line. */
.sisa-gift-strip__nb--end::after {
	content: "→";
	content: "→" / ""; /* alt text "" hides the decorative arrow from AT where supported */
	display: inline-block;
	margin-left: 8px;
	text-decoration: none;
	transition: transform .15s ease;
}
.sisa-gift-strip__link:hover .sisa-gift-strip__nb--end::after { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
	.sisa-gift-strip__nb--end::after { transition: none; }
}

@media (max-width: 479.98px) {
	.sisa-gift-strip__link {
		font-size: 10px;
		letter-spacing: 1.2px;
	}
	.sisa-gift-strip__nb--end::after { margin-left: 6px; }
}

/* ---------- Mini-cart note (below the free-shipping bar, same utility voice) ---------- */
#header .ct-header-cart .sisa-gift-note,
.woocommerce-cart .sisa-gift-note {
	margin: 4px 0 0;
	padding: 12px 0 2px;
	border-top: 1px solid var(--sisa-hairline);
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-family: var(--sisa-body);
	font-size: 13px;
	line-height: 1.45;
	color: var(--sisa-text-2);
}
.sisa-gift-note__mark {
	flex: none;
	width: 8px;
	height: 8px;
	margin-top: 5px;
	background: var(--sisa-yellow);
}
.sisa-gift-note p { margin: 0; }
.sisa-gift-note .woocommerce-Price-amount {
	font-weight: 600;
	color: var(--sisa-ink);
	font-variant-numeric: tabular-nums;
}
/* Reached → ink, like the free-shipping bar's „erreicht" state (same specificity as the base rule above). */
#header .ct-header-cart .sisa-gift-note[data-state="done"],
.woocommerce-cart .sisa-gift-note[data-state="done"] { color: var(--sisa-ink); }

/* Classic cart shortcode: the note sits above the table. */
.woocommerce-cart .sisa-gift-note {
	margin: 0 0 16px;
	padding: 0 0 12px;
	border-top: 0;
	border-bottom: 1px solid var(--sisa-hairline);
}

/* ---------- Block cart: gift rows have no remove action ----------
   (a Store-API removal is re-added on the next calculation anyway; the
   readonly quantity comes from quantity_limits.editable = false). The gift
   row is recognised by its item-data class (Geschenk / Gift). Selector
   mirrors WC's own cart.css chain so it outranks its display rule. */
table.wc-block-cart-items .wc-block-cart-items__row:has(.wc-block-components-product-details__geschenk, .wc-block-components-product-details__gift) .wc-block-cart-item__quantity .wc-block-cart-item__remove-link {
	display: none;
}

/* ---------- Classic cart: locked gift quantity ---------- */
.sisa-gift-qty {
	display: inline-block;
	min-width: 2ch;
	font-variant-numeric: tabular-nums;
	color: var(--sisa-text-1);
}

/* ---------- NR-72 product page notice ---------- */
/* Same grammar as the strip (mono eyebrow, yellow accent) on the soft yellow
   tint so it reads as part of the promotion, not as a warning. */
.sisa-gift-notice {
	display: grid;
	gap: 0.2rem;
	margin: 0 0 1.25rem;
	padding: 0.8rem 1rem 0.85rem 1.05rem;
	background: var(--sisa-yellow-tint);
	border-left: 3px solid var(--sisa-yellow);
	color: var(--sisa-text-1);
}
.sisa-gift-notice__eyebrow {
	font-family: var(--sisa-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 1.2px;
	text-transform: uppercase;
	color: var(--sisa-text-2);
}
.sisa-gift-notice__text {
	margin: 0;
	font-family: var(--sisa-body);
	font-size: 14px;
	line-height: 1.5;
	color: var(--sisa-text-1);
}

/* ---------- Strip: close control ---------- */
/* Header-icon hit area (34px), ink on yellow, no background, sharp. The text
   stays centred on the strip; on narrow screens the row keeps room for the X. */
.sisa-gift-strip__in { position: relative; }
.sisa-gift-strip__close {
	position: absolute;
	top: 50%;
	right: calc(var(--sisa-pad) - 8px);
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--sisa-yellow-ink);
	cursor: pointer;
	opacity: .7;
	transition: opacity .15s ease;
}
.sisa-gift-strip__close:hover { opacity: 1; }
.sisa-gift-strip__close:focus-visible { opacity: 1; outline: 2px solid var(--sisa-yellow-ink); outline-offset: -2px; }
.sisa-gift-strip__close svg { width: 14px; height: 14px; display: block; }
@media (max-width: 479.98px) {
	.sisa-gift-strip__in { padding-right: calc(var(--sisa-pad) + 26px); }
	.sisa-gift-strip__close { right: 2px; }
}
@media (prefers-reduced-motion: reduce) {
	.sisa-gift-strip__close { transition: none; }
}
