/* Scoped to the language component and Header Builder rows containing it. */
.grace-language-links { display:inline-flex; flex-shrink:0; }
.grace-language-links button.grace-language-trigger { box-sizing:border-box; appearance:none; display:inline-flex; flex:0 0 auto; align-items:center; justify-content:center; gap:9px; width:auto; min-width:44px; max-width:none; height:44px; min-height:44px; max-height:44px; margin:0; padding:0 12px; border:1px solid transparent; border-radius:7px; background:transparent; color:inherit; font:600 14px/1.2 Arial,Helvetica,sans-serif; text-transform:none; cursor:pointer; box-shadow:none; }
.grace-language-links button.grace-language-trigger:hover,.grace-language-links button.grace-language-trigger[aria-expanded="true"] { background:rgba(255,255,255,.14); color:inherit; border-color:rgba(255,255,255,.35); box-shadow:none; }
.grace-language-links button.grace-language-trigger svg { display:block; flex-shrink:0; }
.grace-language-links button.grace-language-trigger .grace-language-globe { width:18px; height:18px; min-width:18px; }
.grace-language-links button.grace-language-trigger .grace-language-chevron { width:14px; height:14px; min-width:14px; }
.grace-language-links button.grace-language-trigger:focus-visible { outline:none; box-shadow:none; }
.grace-language-trigger-code { display:none; }
.grace-language-links:has(.grace-language-trigger:focus-visible) { outline:2px solid currentColor; outline-offset:3px; border-radius:7px; }
.grace-language-drawer { box-sizing:border-box; position:fixed; inset:0 0 0 auto; margin:0; padding:32px 28px; width:400px; max-width:calc(100vw - 28px); height:100%; height:100dvh; max-height:100dvh; border:0; border-left:1px solid #e9e9e9; border-radius:0; background:#fff; color:#333; box-shadow:-12px 0 48px #00000012; font:400 16px/1.5 Arial,Helvetica,sans-serif; overflow:auto; overscroll-behavior:contain; }
.grace-language-drawer:not([open]) { display:none; }
.grace-language-drawer[open] { animation:grace-language-in .2s ease-out; }
.grace-language-drawer::backdrop { background:rgba(18,22,26,.34); }
.grace-language-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 30px; }
.grace-language-title { margin:0; padding:0; font:600 22px/1.3 Arial,Helvetica,sans-serif; letter-spacing:-.3px; color:#333; text-transform:none; }
.grace-language-drawer button.grace-language-close { box-sizing:border-box; appearance:none; display:grid; flex:0 0 44px; place-items:center; width:44px; min-width:44px; max-width:44px; height:44px; min-height:44px; max-height:44px; margin:0; padding:0; border:1px solid #e9e9e9; border-radius:50%; background:#fff; color:#333; cursor:pointer; box-shadow:none; }
.grace-language-drawer button.grace-language-close svg { display:block; flex:0 0 20px; width:20px; min-width:20px; max-width:20px; height:20px; min-height:20px; max-height:20px; }
.grace-language-drawer button.grace-language-close:hover { color:#333; background:#f4f4f4; box-shadow:none; }
.grace-language-options { display:grid; gap:8px; }
.grace-language-option { box-sizing:border-box; display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:64px; padding:18px 20px; border:1px solid #e8e8e8; border-radius:8px; color:#333; background:#fff; font:400 16px/1.5 Arial,Helvetica,sans-serif; text-decoration:none; overflow-wrap:anywhere; }
a.grace-language-option:hover { border-color:#b8b8b8; background:#f8f8f8; color:#333; text-decoration:none; }
.grace-language-option[aria-current="true"] { border-color:#f80000; background:#fff5f5; color:#e60000; font-weight:600; }
.grace-language-option[hidden] { display:none; }
.grace-language-check { flex-shrink:0; }
.grace-language-drawer :focus-visible,.grace-language-drawer button.grace-language-close:focus-visible { outline:2px solid #333; outline-offset:4px; }
.grace-language-search-label { display:block; margin:0 0 8px; color:#666; font-size:14px; }
.grace-language-search { box-sizing:border-box; width:100%; height:48px; margin:0 0 18px; padding:0 14px; border:1px solid #bbb; border-radius:7px; font:inherit; background:white; color:#333; }
.grace-language-empty { margin:20px 0; font:inherit; color:#666; }
html.grace-language-is-open { overflow:hidden; }
/* Header Builder keeps the control after the main menu in the same column. */
.whb-header-bottom .whb-column:has(.grace-language-links) { align-items:center; }
.whb-header-bottom .wd-header-text:has(.grace-language-links) { flex:0 0 auto; width:auto; margin:0; line-height:1; }
.whb-header-bottom .wd-header-text:has(.grace-language-links) p { margin:0; }
@media (min-width:1025px) {
  .whb-header-bottom .whb-col-left:has(.grace-language-links) { justify-content:center; gap:8px; }
  .whb-header-bottom .whb-col-left:has(.grace-language-links) .wd-header-nav { flex:0 1 auto; width:auto; min-width:0; }
  .whb-header-bottom .whb-col-left .grace-language-links { color:#fff; }
}
@keyframes grace-language-in { from { transform:translateX(36px); opacity:0; } to { transform:translateX(0); opacity:1; } }
@media (max-width:1024px) {
  header.whb-header:has(.grace-language-links) { position:sticky; top:0; z-index:390; }
  body.admin-bar header.whb-header:has(.grace-language-links) { top:32px; }
  header .whb-header-bottom:has(.grace-language-links) { background:#fff; border-bottom:1px solid #eee; }
  .whb-header-bottom:has(.grace-language-links) .whb-flex-row { min-height:64px; height:64px; }
  .whb-header-bottom .whb-col-mobile:has(.grace-language-links) { position:relative; justify-content:space-between; padding:0 9px; min-height:64px; }
  .whb-header-bottom .whb-col-mobile:has(.grace-language-links) .wd-header-mobile-nav { margin:0; width:68px; }
  .whb-header-bottom .whb-col-mobile:has(.grace-language-links) .wd-header-mobile-nav a { width:44px; height:44px; display:grid; place-items:center; color:#333; }
  .whb-header-bottom .whb-col-mobile:has(.grace-language-links) .wd-header-text { margin-left:auto; }
  .whb-header-bottom .whb-col-mobile .grace-language-links { color:#333; }
  .whb-header-bottom .whb-col-mobile .grace-language-links button.grace-language-trigger:hover { background:#f4f4f4; }
  .whb-header-bottom .whb-col-mobile:has(.grace-language-links) .site-logo { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); display:flex; align-items:center; justify-content:center; width:70px; height:56px; margin:0; }
  .whb-header-bottom .whb-col-mobile:has(.grace-language-links) .site-logo img { display:block; width:54px; height:54px; max-height:54px; object-fit:contain; }
  .grace-language-trigger-name,.grace-language-links button.grace-language-trigger .grace-language-chevron { display:none; }
  .grace-language-trigger-code { display:inline; }
  .grace-language-links button.grace-language-trigger { min-width:68px; gap:7px; padding:0 8px; }
  .grace-language-drawer { width:360px; padding:24px 20px; padding-top:max(24px,env(safe-area-inset-top)); padding-bottom:max(24px,env(safe-area-inset-bottom)); }
  .grace-language-title { font-size:21px; }
  .grace-language-header { margin-bottom:24px; }
}
@media (max-width:782px) { body.admin-bar header.whb-header:has(.grace-language-links) { top:46px; } }
@media (prefers-reduced-motion:reduce) { .grace-language-drawer[open] { animation:none; } }
