/* HF-1 H-3 (owner, reopened): ONE style for the three provider buttons and the label centred on the WHOLE button.
   - one set of tokens (surface, border, ink, hover) per theme, the same for Google / Microsoft / Yahoo: equal height, radius, font and focus ring; only the provider MARK is the brand's own
     (Google and Microsoft colour marks; Yahoo purple wordmark on light, its white wordmark on dark), as the provider guidelines require for the mark and nothing else;
   - the mark is positioned at the start edge, the label fills the whole button and is centred on it; equal padding on both sides keeps the text clear of the mark and wraps long
     labels (de, nl, it at 320 px) onto a second line instead of clipping them. */
.account-provider-stack {
  --sso-bg: #ffffff;
  --sso-bg-hover: #f5f5f5;
  --sso-border: #8c8c8c;
  --sso-ink: #1f1f1f;
  --sso-mark-column: 72px;
  /* one column that may shrink: with the default auto track the buttons' max-content (a one-line label plus the two paddings) pushed them past the dialog's right edge at 320 px */
  grid-template-columns: minmax(0, 1fr);
}
:root[data-theme="dark"] .account-provider-stack {
  --sso-bg: #131314;
  --sso-bg-hover: #202124;
  --sso-border: #8e918f;
  --sso-ink: #e3e3e3;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .account-provider-stack {
    --sso-bg: #131314;
    --sso-bg-hover: #202124;
    --sso-border: #8e918f;
    --sso-ink: #e3e3e3;
  }
}

.account-provider-stack .auth-provider-action[data-provider-brand] {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  /* the same space on both sides: the label is centred on the button and never reaches the mark */
  padding: 10px var(--sso-mark-column);
  border: 1px solid var(--sso-border);
  border-radius: 6px;
  background: var(--sso-bg);
  color: var(--sso-ink);
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}
.account-provider-stack .auth-provider-action[data-provider-brand]:hover { background: var(--sso-bg-hover); border-color: var(--sso-border); }
.account-provider-stack .auth-provider-action[data-provider-brand]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 72%, transparent);
  outline-offset: 2px;
}

.account-provider-stack .auth-provider-action[data-provider-brand] .auth-provider-icon {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 54px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  background: transparent;
}
.account-provider-stack .auth-provider-action[data-provider-brand] .auth-provider-balance { display: none; }

.account-provider-stack .auth-provider-action[data-provider-brand="google"] .auth-provider-icon svg,
.account-provider-stack .auth-provider-action[data-provider-brand="microsoft"] .auth-provider-icon svg {
  box-sizing: content-box;
  width: 20px;
  height: 20px;
  padding: 2px;
  display: block;
  border-radius: 2px;
  background: #ffffff;
  transform: none;
  filter: none;
}

.account-provider-stack .auth-provider-action[data-provider-brand] .auth-provider-label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 24px;
  line-height: 20px;
  text-align: center;
  white-space: normal; /* long labels wrap inside the button instead of running under the mark */
  overflow-wrap: anywhere;
}

/* Yahoo: the mark is the only brand-specific part (its 54 px painted-width contract is set below; the label keeps the same padding as the other two). */
.account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo {
  display: block;
  object-fit: contain;
  object-position: left center;
  transform: none;
  filter: none;
  opacity: 1;
}
.account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-white { display: none; }
:root[data-theme="dark"] .account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-purple { display: none; }
:root[data-theme="dark"] .account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-white { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-purple { display: none; }
  :root:not([data-theme]) .account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-white { display: block; }
}

@media (max-width: 420px) {
  .account-provider-stack { --sso-mark-column: 68px; }
  .account-provider-stack .auth-provider-action[data-provider-brand] { min-height: 50px; }
  .account-provider-stack .auth-provider-action[data-provider-brand] .auth-provider-icon { inset-inline-start: 10px; }
}

/* The purple PNG is framed to its measured painted bounds by the inline SVG.
   Light and dark therefore share one exact 54px painted-width contract. */
.account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-purple,
.account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-white {
  width: 54px;
  max-width: 54px;
  height: auto;
  max-height: 20px;
}

.account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-purple {
  overflow: hidden;
}

/* 200 % zoom on a 428 px phone = ~214 CSS px: a 72 px mark column on each side would leave the label a few pixels. Smaller mark column, smaller Yahoo wordmark (the contract of
   54 px stays for every normal width), so the label still has room and stays centred. */
@media (max-width: 260px) {
  .account-provider-stack { --sso-mark-column: 38px; }
  .account-provider-stack .auth-provider-action[data-provider-brand] .auth-provider-icon { inset-inline-start: 6px; width: 28px; }
  .account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-purple,
  .account-provider-stack .auth-provider-action[data-provider-brand="yahoo"] .auth-provider-mark--yahoo-white { width: 28px; max-width: 28px; max-height: 14px; }
}

/* D07 owner-art visual alignment. Presentation only, no auth/policy contract edits. */
:root { --d07-paper:#fff7ec; --d07-border:#c9a166; --d07-ink:#38263a; }
:root[data-theme="dark"] { --d07-paper:#121d30; --d07-border:#ae874c; --d07-ink:#f4e8d5; }
.adult-policy-dialog { box-sizing:border-box; width:min(440px,calc(100vw - 28px)); max-width:calc(100vw - 28px); max-height:min(92dvh,800px); padding:0; margin:auto; overflow:auto; border:1px solid var(--d07-border); border-radius:14px; background:var(--d07-paper); color:var(--d07-ink); box-shadow:0 24px 92px rgba(6,9,18,.46); color-scheme:light; }
:root[data-theme="dark"] .adult-policy-dialog{color-scheme:dark;background:var(--d07-paper)}
.adult-policy-dialog::backdrop {background:rgba(8,12,23,.71);backdrop-filter:blur(3px)}
.adult-policy-dialog h2 {font:600 clamp(27px,3vw,34px)/1.1 Georgia,serif;color:var(--d07-ink);margin:8px 0}
.adult-policy-dialog .adult-policy-content {box-sizing:border-box;width:100%;max-width:100%;padding:26px 25px 24px;background:transparent;display:grid;gap:14px;}
.adult-policy-dialog .adult-policy-heading {display:grid;gap:7px}.adult-policy-dialog .adult-policy-consent {display:flex;gap:13px;align-items:flex-start;padding:15px;border:1px solid var(--d07-border);border-radius:9px;font-size:13px;line-height:1.55;cursor:pointer;color:var(--d07-ink)}
.adult-policy-dialog .adult-policy-actions {display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:5px}
.adult-policy-dialog .adult-policy-actions .ui-button {min-height:44px;justify-content:center;white-space:normal}
.adult-policy-dialog .adult-policy-status {min-height:1.1em;font-size:12px}
.global-account-auth-dialog :is(button,a):focus-visible{outline:3px solid #b98c44;outline-offset:3px}
@media(max-width:420px){.adult-policy-dialog{width:calc(100vw - 24px);max-height:calc(100dvh - 28px);border-radius:11px}.adult-policy-dialog .adult-policy-content{padding:20px 17px}.adult-policy-dialog h2{font-size:29px}}
@media(max-height:560px){.adult-policy-dialog{max-height:calc(100dvh - 12px)}}
@media(prefers-reduced-motion:reduce){.global-account-auth-dialog *, .adult-policy-dialog *{transition:none !important;animation:none !important}}
/* W23 #609 — the 18+ dialog ("For adults 18 and over") on the tokens of the CURRENT theme. Styles only: no Access/18+ logic.
   Before: the dialog was dark only for an explicit Dark choice, so with the OS-dark default (theme "system") it stayed
   cream while its text, row and Cancel took dark-theme colours (label 1.34:1, Cancel 2.08:1), and the consent row used a
   page token that is near-black in Dark. Now the paper, ink, field, checkbox, focus and error colours come from one
   token set per theme (Day, explicit Dark, OS-dark default). Contrast on paper / field: ink >= 12:1, checkbox border
   and focus ring >= 5:1 (WCAG 1.4.3 / 1.4.11), error >= 7:1. */
.adult-policy-dialog { --adult-field: var(--surface-soft); --adult-control: #8a5f1f; --adult-focus: #8a5f1f; --adult-danger: #9d1c2f; }
:root[data-theme="dark"] .adult-policy-dialog { --adult-field: #1a2740; --adult-control: #d9b26a; --adult-focus: #e0b96e; --adult-danger: #ffb4ab; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .adult-policy-dialog {
    --d07-paper: #121d30; --d07-border: #ae874c; --d07-ink: #f4e8d5;
    --adult-field: #1a2740; --adult-control: #d9b26a; --adult-focus: #e0b96e; --adult-danger: #ffb4ab;
    background: var(--d07-paper); color: var(--d07-ink); color-scheme: dark;
  }
}
.adult-policy-dialog .adult-policy-consent { background: var(--adult-field); border-color: var(--d07-border); color: var(--d07-ink); }
.adult-policy-dialog .adult-policy-consent span { color: var(--d07-ink); }
.adult-policy-dialog .adult-policy-checkbox {
  appearance: none; -webkit-appearance: none; box-sizing: border-box; flex: 0 0 auto;
  display: inline-grid; place-content: center; width: 22px; height: 22px; min-width: 22px; min-height: 22px; margin: 1px 0 0;
  border: 2px solid var(--adult-control); border-radius: 6px; background: transparent; cursor: pointer;
}
.adult-policy-dialog .adult-policy-checkbox:checked { background: var(--adult-control); }
.adult-policy-dialog .adult-policy-checkbox::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px; border: solid var(--d07-paper); border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(0);
}
.adult-policy-dialog .adult-policy-checkbox:checked::after { transform: rotate(45deg) scale(1); }
.adult-policy-dialog .adult-policy-checkbox:disabled { opacity: .6; cursor: not-allowed; }
.adult-policy-dialog :is(input, button):focus-visible { outline: 3px solid var(--adult-focus); outline-offset: 3px; }
.adult-policy-dialog .adult-policy-actions .ui-button[data-variant="ghost"] { color: var(--d07-ink); border-color: var(--d07-border); }
.adult-policy-dialog .adult-policy-actions .ui-button:disabled { opacity: .6; cursor: not-allowed; }
.adult-policy-dialog .adult-policy-status { color: var(--adult-danger); }
/* Reflow: at 200% zoom on a phone (195 CSS px) the two-column actions row forced the content wider than the dialog. */
.adult-policy-dialog .adult-policy-content > * { min-width: 0; }
.adult-policy-dialog .adult-policy-actions { grid-template-columns: repeat(auto-fit, minmax(min(100%, 124px), 1fr)); }
.adult-policy-dialog :is(h2, .adult-policy-lead, .adult-policy-consent span) { overflow-wrap: anywhere; }
@media (forced-colors: active) { .adult-policy-dialog .adult-policy-checkbox { appearance: auto; -webkit-appearance: auto; } }


/* HF-1 H-3 (owner, reopened): the 2026-10-25 block that lived here (<=480 px: drop the balance column, keep the label on ONE line "centred in what is left") is the cause of the label sitting
   right of the button centre on phones. It is gone: one rule set (above) for every width, the label centred on the whole button and wrapping inside its padding. */
