/* P8-ES-HOME-ENTRY-11 — Portal 8 IP-pilot language choice: the compact prompt (on top of v3-account-welcome.css) and the footer
   selector. Existing tokens only. */
.p8l-dialog { max-width: 420px; }
.p8l-top { padding-bottom: 6px; }
.p8l-title { margin: 0; }
.p8l-hint { margin-top: 10px; }
.p8l-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.p8l-choice { justify-content: center; text-decoration: none; }
.p8l-choice:focus-visible { outline: 3px solid var(--green-bright, #5ab120); outline-offset: 2px; }
@media (max-width: 380px) {
    .p8l-choices { grid-template-columns: 1fr; }
}
/* DG-P8-LANGUAGE-FLAGS-17-FOLLOWUP (Mark) — a calmer chooser: a plain soft top instead of the celebration dots, a smaller question,
   the smaller English line under the Spanish question, and two choices with the same visual weight (one shared calm style, a flag
   before each label; order per variant unchanged in the markup). */
.p8l-dialog .p8l-top { padding: 30px 26px 14px; background: linear-gradient(180deg, var(--green-softer, #f1f9ec) 0%, var(--card, #fff) 100%); }
.p8l-dialog .p8l-title { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.p8l-title-en { margin: 6px 0 0; font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--muted, #566159); }
.p8l-choices .p8l-choice { gap: 10px; background: #fff; color: var(--ink, #171d18); border: 1.5px solid #cfd6cc; box-shadow: none; font-weight: 700; }
.p8l-choices .p8l-choice:hover { border-color: var(--green, #2f8f27); background: var(--green-softer, #f1f9ec); color: var(--ink, #171d18); }
.p8l-choices .p8l-choice .p8l-flag { width: 21px; height: 14px; }
@media (max-width: 480px) {
    .p8l-dialog .p8l-top { padding: 26px 20px 12px; }
    .p8l-dialog .p8l-title { font-size: 21px; }
    .p8l-title-en { font-size: 14px; }
}

.d-foot-lang { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; }
.d-foot-lang-label { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.d-foot-lang-label .ico { width: 16px; height: 16px; }
.d-foot-lang ul { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.d-foot-lang a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid currentColor; border-radius: 999px; text-decoration: none; line-height: 1.4; }
.d-foot-lang a[aria-current="true"] { font-weight: 700; background: var(--green-dark, #1f6a1a); border-color: var(--green-dark, #1f6a1a); color: #fff; }
.d-foot-lang a:focus-visible { outline: 3px solid var(--green-bright, #5ab120); outline-offset: 2px; }

/* P8-TAALKEUZE-SECRETPAGE-17 — the English | Español pair in the desktop top bar and at the top of the opened mobile menu
   (partials/v3/p8-language-switch.php). The top bar pair stays out of the phone header (the phone uses the menu pair). */
.p8l-switch { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; line-height: 1.2; white-space: nowrap; }
.p8l-switch a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 999px; color: inherit; text-decoration: none; }
.p8l-switch a:hover { text-decoration: underline; }
.p8l-switch a[aria-current="true"] { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.p8l-switch a:focus-visible { outline: 3px solid var(--green-bright, #5ab120); outline-offset: 2px; }
.p8l-switch-sep { opacity: .55; }
.p8l-switch--topbar { margin-right: 4px; }
.p8l-switch--menu { flex: none; margin: 0 22px 0 auto; color: #fff; } /* DG-P8-LANGUAGE-FLAGS-17: was margin 0 8px (see the head note below) */
.p8l-switch--menu a[aria-current="true"] { background: rgba(255, 255, 255, .18); }
.p8l-switch--menu a:focus-visible { outline-color: #fff; }
@media (max-width: 720px) {
    .p8l-switch--topbar { display: none; }
}

/* DG-P8-LANGUAGE-FLAGS-17 — a small decorative flag before English (GB) and Español (ES) in all three selectors (top bar, mobile
   menu, footer). Same size for both, aligned to the label; aria-hidden in the markup. Local SVGs next to flag-pt.svg, the same GB
   shape and ES colours as the home USP flags (v3-home-refine.css). */
.p8l-flag { display: inline-block; flex: none; width: 18px; height: 12px; border-radius: 2px; background: center / cover no-repeat; box-shadow: 0 0 0 1px rgba(23, 29, 24, .16); }
.p8l-flag--gb { background-color: #012169; background-image: url("../img/v3/flags/flag-gb.svg"); }
.p8l-flag--es { background-color: #c60b1e; background-image: url("../img/v3/flags/flag-es.svg"); }
.p8l-switch--menu .p8l-flag { box-shadow: 0 0 0 1px rgba(255, 255, 255, .45); }

/* DG-P8-LANGUAGE-FLAGS-17 — mobile menu head: about 12px visible room between the language pair (also its active pill) and the
   close button. The close button keeps its own size, hit area and its -10px left margin (v3 hamburger rule), so the pair carries
   22px right margin (22 - 10 = 12). Only when the row really does not fit (head narrower than the measured need of title + pair +
   at least 10px + pair + 12px + close: ~318px content width = ~354px head incl. its 18px padding) does the pair move to its own line under "Menu"; the close button stays top right. */
@supports (container-type: inline-size) {
    #v3-drawer .drawer-head:has(> .p8l-switch--menu) { container-type: inline-size; flex-wrap: wrap; row-gap: 6px; }
    @container (max-width: 317.98px) {
        #v3-drawer .drawer-head > .p8l-switch--menu { order: 3; flex: 1 0 100%; margin: 0 0 2px -8px; }
    }
}
