/* «Η Υπόσχεση των Ξωτικών» on the cart page (santamail-elf-promise.php, BR-EPR-001…010; the owner's mockup
   docs/mockups/guarantee-2026/checkout/N24.html). Loaded in <head>, so the row the server prints is in its final
   size at the first paint. Every state change is colour only: nothing grows, shrinks or moves (BR-EPR-004).
   Everything is scoped under sm-ep; the cart page loads no other sheet of ours. */
:root { --sm-ep-ink: #1f1f1f; --sm-ep-muted: #5f5750; --sm-ep-soft: #6f665f; --sm-ep-red: #de1f26; --sm-ep-line: #e4dcd4; --sm-ep-edge: #8c8279; --sm-ep-surface: #fbf8f5; }

/* On the cart the row is the fee line: WooCommerce's own row for this fee (marked by the plugin) stays hidden, but
   only while the row itself is shown (sm-ep-js); with the script dead or JavaScript off a saved tick still charges,
   so WooCommerce's own line shows it (BR-EPR-007). */
html.sm-ep-js .cart_totals tr.fee:has(.sm-ep-fee) { display: none; }

/* ---- the row: one cell across the totals table, left-aligned, no mobile «data-title» label. */
.cart_totals tr.sm-ep-row > td { padding: 10px 0 !important; text-align: left !important; vertical-align: top; }
.cart_totals tr.sm-ep-row > td::before { content: none !important; display: none !important; }
.sm-ep, .sm-ep * { box-sizing: border-box; }
.sm-ep { margin: 0; padding: 0; background: none; text-align: left; letter-spacing: 0; text-transform: none; }
.sm-ep .sm-ep-label {
	position: relative; display: grid; grid-template-columns: 22px 1fr auto; column-gap: 14px; row-gap: 2px; align-items: start;
	margin: 0; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
	font-size: 15px; line-height: 21px; font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--sm-ep-ink);
}
.sm-ep .sm-ep-label:has(.sm-ep-input:focus-visible) { outline: 2px solid var(--sm-ep-ink); outline-offset: 3px; border-radius: 4px; }
.sm-ep .sm-ep-input { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; }
/* The square tick: the edge #8c8279 is 3.8:1 on white. */
.sm-ep .sm-ep-box {
	grid-row: 1 / 3; grid-column: 1; align-self: start; display: grid; place-items: center; width: 22px; height: 22px; margin-top: 0;
	border: 1.5px solid var(--sm-ep-edge); border-radius: 4px; background: #fff; color: #fff;
	transition: background-color 160ms ease, border-color 160ms ease;
}
.sm-ep .sm-ep-box svg { display: block; width: 13px; height: 13px; opacity: 0; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.sm-ep .sm-ep-input:checked + .sm-ep-box { border-color: var(--sm-ep-red); background: var(--sm-ep-red); }
.sm-ep .sm-ep-input:checked + .sm-ep-box svg { opacity: 1; }
.sm-ep .sm-ep-name { grid-row: 1; grid-column: 2; min-width: 0; font-weight: 700; color: var(--sm-ep-ink); }
/* The price reads as an offer until ticked, then as a charge like the other figures (colour only). */
.sm-ep .sm-ep-price { grid-row: 1; grid-column: 3; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--sm-ep-muted); }
.sm-ep .sm-ep-input:checked ~ .sm-ep-price { color: var(--sm-ep-ink); }
.sm-ep .sm-ep-line { grid-row: 2; grid-column: 2 / 4; color: var(--sm-ep-muted); }
@media (prefers-reduced-motion: reduce) { .sm-ep .sm-ep-box { transition: none; } }

/* The link, 45 px to tap (12 + 21 + 12) while it takes 21 + 6 of the row: the margins give the padding back. */
.sm-ep .sm-ep-link {
	display: inline-block; width: auto; height: auto; min-height: 0; margin: -6px 0 -12px 36px; padding: 12px 0; border: 0; border-radius: 0;
	background: none; box-shadow: none; font: inherit; font-size: 15px; line-height: 21px; font-weight: 600; letter-spacing: 0; text-transform: none; text-align: left;
	color: var(--sm-ep-red); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.sm-ep .sm-ep-link:hover, .sm-ep .sm-ep-link:focus { background: none; color: var(--sm-ep-red); }
.sm-ep .sm-ep-link:focus-visible { outline: 2px solid var(--sm-ep-red); outline-offset: -6px; border-radius: 6px; }

/* The Stripe express buttons (BR-EPR-010, elf-promise.js restripe): from a tap until the new ones are in, the old
   ones take no taps; while the new ones draw, the old stand where they were, out of the flow and above them, and the
   new ones are see-through (never visibility:hidden, Stripe draws nothing there). */
#wc-stripe-express-checkout-element.sm-ep-stale > *, #wc-stripe-express-checkout-element > .sm-ep-old { pointer-events: none; }
#wc-stripe-express-checkout-element.sm-ep-swap { position: relative; }
#wc-stripe-express-checkout-element > .sm-ep-old { position: absolute; left: 0; right: 0; z-index: 1; }
#wc-stripe-express-checkout-element.sm-ep-swap > :not(.sm-ep-old) { opacity: 0; }

/* While the tick call is on its way: «Σύνολο» dims, nothing moves. */
.cart_totals.sm-ep-wait tr.order-total td { opacity: .45; transition: opacity 120ms ease; }

/* ---- the pop-up: fixed over the page, 8 px from the sides of a phone, the page still behind it. */
html.sm-ep-locked { overflow: hidden; padding-right: var(--sm-ep-bar, 0px); }
html.sm-ep-locked body { overflow: hidden; }
.sm-ep-shade { position: fixed; inset: 0; z-index: 99990; background: rgba(20, 16, 14, .5); opacity: 0; pointer-events: none; transition: opacity 200ms ease; }
.sm-ep-shade.is-open { opacity: 1; pointer-events: auto; }
.sm-ep-sheet {
	position: fixed; left: 50%; top: 50%; z-index: 99991; box-sizing: border-box; width: min(440px, calc(100vw - 16px)); max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
	overflow: auto; overscroll-behavior: contain; margin: 0; padding: 20px 14px; background: #fff; border-radius: 20px; box-shadow: 0 16px 48px rgba(0, 0, 0, .22);
	text-align: left; letter-spacing: 0; text-transform: none; color: var(--sm-ep-ink);
	opacity: 0; transform: translate(-50%, -50%) scale(.96); visibility: hidden;
	transition: opacity 200ms ease, transform 260ms ease, visibility 0s 260ms;
}
.sm-ep-sheet.is-open { opacity: 1; transform: translate(-50%, -50%); visibility: visible; transition: opacity 200ms ease, transform 260ms ease; }
@media (prefers-reduced-motion: reduce) { .sm-ep-sheet, .sm-ep-shade { transition: none; } }
.sm-ep-sheet * { box-sizing: border-box; }
.sm-ep-sheet .sm-ep-title { margin: 0 50px 0 0; padding: 6px 0 0; font-size: 20px; line-height: 26px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--sm-ep-ink); }
.sm-ep-sheet .sm-ep-head { margin: 14px 0 0; padding: 0; font-size: 14px; line-height: 20px; font-weight: 600; color: var(--sm-ep-soft); }
.sm-ep-sheet .sm-ep-list { display: grid; gap: 8px; margin: 8px -6px 0; padding: 0; list-style: none; }
.sm-ep-sheet .sm-ep-list li {
	display: flex; align-items: center; gap: 8px; min-height: 50px; margin: 0; padding: 12px 8px 12px 10px;
	border: 1px solid var(--sm-ep-line); border-radius: 12px; background: #fff; list-style: none;
}
.sm-ep-sheet .sm-ep-list li::before { content: none; }
.sm-ep-sheet .sm-ep-list svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--sm-ep-red); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.sm-ep-sheet .sm-ep-it { display: block; font-size: 15px; line-height: 21px; font-weight: 700; color: var(--sm-ep-ink); }
.sm-ep-sheet .sm-ep-is { display: block; margin-top: 2px; font-size: 14px; line-height: 19px; font-weight: 400; color: var(--sm-ep-soft); }
.sm-ep-sheet .sm-ep-go {
	display: block; width: 100%; height: 48px; min-height: 0; margin: 20px 0 0; padding: 0 16px; border: 0; border-radius: 12px;
	background: var(--sm-ep-red); color: #fff; font: inherit; font-size: 16px; line-height: 48px; font-weight: 700; letter-spacing: 0; text-transform: none; cursor: pointer;
}
/* The "added" state: when the row is already ticked the button only closes. */
.sm-ep-sheet .sm-ep-go.is-quiet { background: #fff; color: var(--sm-ep-ink); box-shadow: inset 0 0 0 1px var(--sm-ep-line); }
.sm-ep-sheet .sm-ep-go:focus-visible { outline: 2px solid var(--sm-ep-ink); outline-offset: 2px; }
.sm-ep-sheet .sm-ep-x {
	position: absolute; top: 14px; right: 14px; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0;
	border: 0; border-radius: 50%; background: var(--sm-ep-surface); box-shadow: inset 0 0 0 1px var(--sm-ep-line); cursor: pointer;
}
/* 36 px to look at, 44 px to tap. */
.sm-ep-sheet .sm-ep-x::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.sm-ep-sheet .sm-ep-x:focus-visible { outline: 2px solid var(--sm-ep-ink); outline-offset: 2px; }
.sm-ep-sheet .sm-ep-x svg { width: 18px; height: 18px; fill: none; stroke: var(--sm-ep-ink); stroke-width: 2; stroke-linecap: round; }
