/* Language controls fit the existing portal toolbar. */
.portal-stage2__locale,.portal-stage2__locale form{display:flex;align-items:center;gap:4px;margin:0}
.portal-stage2__locale{margin-inline-start:8px}
.portal-stage2__locale a,.portal-stage2__locale button{box-sizing:border-box;display:inline-block;font:inherit;font-size:12px;line-height:1.2;font-weight:600;text-decoration:none;padding:6px 8px;color:#334155;background:#fff;border:1px solid #dce2eb;border-radius:6px;cursor:pointer}
.portal-stage2__locale [aria-current=true]{color:#fff;background:#334155;border-color:#334155}
.portal-stage2__locale a:focus-visible,.portal-stage2__locale button:focus-visible{outline:2px solid #2563eb;outline-offset:2px}

/* Portal uses the same compact dropdown pattern as the public header. */
.portal-language-switcher{position:relative;margin-inline-start:8px}
.portal-language-switcher>summary{list-style:none}
.portal-language-switcher>summary::-webkit-details-marker{display:none}
.portal-language-switcher .portal-language-menu{position:absolute;top:calc(100% + 8px);right:0;left:auto;width:220px;max-width:min(220px,calc(100vw - 24px));padding:.65rem}
.portal-language-switcher .language-list{max-height:none;margin:0;padding:0;list-style:none}
.portal-language-switcher .language-option{display:grid;width:100%;min-height:44px;padding:.55rem .65rem;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.8rem;text-decoration:none}
.portal-language-switcher .language-option[aria-current=page]{background:var(--accent-soft);color:var(--accent-dark)}
.portal-language-switcher[open] .language-trigger__chevron{transform:rotate(180deg)}

.portal-stage2 .portal-language-switcher{flex:0 0 auto}
.portal-stage2 .portal-language-switcher>summary{display:inline-flex;min-width:58px;min-height:44px;padding:.55rem .7rem;align-items:center;justify-content:center;gap:.35rem;color:var(--portal-text);background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:var(--portal-control-radius);font-size:14px;font-weight:650;line-height:1;cursor:pointer}
.portal-stage2 .portal-language-switcher[open]>summary{color:var(--portal-primary-hover);background:var(--portal-primary-soft);border-color:#9ebcf0}
.portal-stage2 .portal-language-switcher .portal-language-menu{position:absolute;z-index:100;top:calc(100% + 8px);right:0;left:auto;width:220px;max-width:min(220px,calc(100vw - 24px));padding:.65rem;overflow:hidden;color:var(--portal-text);background:var(--portal-surface);border:1px solid var(--portal-border);border-radius:14px;box-shadow:0 18px 46px rgba(18,36,68,.14)}
.portal-stage2 .portal-language-switcher .language-list{max-height:none;margin:0;padding:0;list-style:none}
.portal-stage2 .portal-language-switcher .language-option{display:grid;width:100%;min-height:44px;padding:.55rem .65rem;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:.8rem;color:inherit;background:transparent;border:0;border-radius:9px;text-align:left;text-decoration:none;cursor:pointer}
.portal-stage2 .portal-language-switcher .language-option[aria-current=page]{color:var(--portal-primary-hover);background:var(--portal-primary-soft)}
@media (hover:hover){.portal-stage2 .portal-language-switcher .language-option:hover{color:var(--portal-primary-hover);background:var(--portal-primary-soft)}}
@media (max-width:640px){.portal-stage2 .portal-language-switcher{margin-inline-start:0}.portal-stage2 .portal-language-switcher>summary{min-width:44px;min-height:44px;padding:.5rem}.portal-stage2 .portal-language-switcher .portal-language-menu{position:fixed;top:74px;right:16px;left:auto;width:min(220px,calc(100vw - 32px));max-width:calc(100vw - 32px)}}
