@import url("theme.css");
/* Shared site header and footer styles. Page-specific styles may still override these. */
.hidden { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 1000; padding: 12px 18px; border-radius: 5px; background: white; color: #252b49; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
body :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 3px solid #a91b30 !important; outline-offset: 3px; }
.topbar :is(a, button):focus-visible, .footer-bar a:focus-visible { outline-color: white !important; }
body .muted, body .source-meta { color: #626262; }
body :is(main, dialog) :is(button, .button, summary) { min-height: 44px !important; }
body dialog .icon-button { min-width: 44px; }
@media (max-width: 760px) {
    body main button, body dialog button { min-width: 44px; }
    body main .toolbar-actions .button { width: auto; min-width: 44px; min-height: 44px; }
    body main select, body dialog select { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
.topbar, .footer-bar { color: white; background: var(--brand-gradient, linear-gradient(130deg, #252B49 0%, #A91B30 100%)); }
.topbar { position: relative; z-index: 50; padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.footer-bar { padding-bottom: env(safe-area-inset-bottom); }
.topbar-inner, .footer-inner { display: flex; max-width: 1380px; align-items: center; justify-content: space-between; gap: 10px 22px; margin: 0 auto; padding: 14px 32px; }
.footer-inner { flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 16px; padding-bottom: 16px; font-family: var(--heading-font, "Roboto", "Noto Sans Thai", sans-serif); font-size: 14px; font-weight: 500; }
.policy-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 20px; font-size: 12px; font-weight: 400; }
.policy-links a { display: inline-flex; min-height: 44px; align-items: center; color: rgb(255 255 255 / 85%); text-decoration: none; text-underline-offset: 4px; }
.policy-links a:hover { color: white; text-decoration: underline; }
.policy-links a:focus-visible { color: white; outline: 2px solid white; outline-offset: 4px; border-radius: 2px; }
@media (max-width: 760px) {
    .footer-inner { flex-direction: column; justify-content: center; gap: 4px; padding: 18px 16px; text-align: center; }
    .policy-links { justify-content: center; gap: 0 16px; }
}
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; color: inherit; text-decoration: none; }
.brand-mark { display: grid; flex: none; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--navy, #252B49); background: white; font-size: 22px; }
.brand-text { display: grid; }
.brand-title { margin: 0; color: white; font-family: var(--heading-font, "Roboto", "Noto Sans Thai", sans-serif); font-size: 26px; font-weight: 600; line-height: 1.2; }
.brand-note { margin: 2px 0 0; color: rgb(255 255 255 / 80%); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.top-nav { display: flex; align-items: center; gap: 8px 22px; }
.top-tools { display: flex; align-items: center; gap: 10px 14px; }
.top-tools .theme-toggle { box-sizing: border-box; min-width: 36px; min-height: 36px; height: 36px; padding: 0 7px; border-color: rgb(255 255 255 / 55%); }
.top-tools .theme-toggle:hover { background: rgb(255 255 255 / 12%); }
.nav-link { color: white; font-family: var(--heading-font, "Roboto", "Noto Sans Thai", sans-serif); font-weight: 500; text-decoration: none; white-space: nowrap; }
.nav-link:hover { text-decoration: underline; }
.nav-link[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; }
.account-pill { display: inline-flex; max-width: 220px; min-height: 40px; align-items: center; gap: 8px; padding: 0 16px; overflow: hidden; border: 2px solid white; border-radius: 999px; color: var(--navy, #252B49); background: white; font-family: var(--heading-font, "Roboto", "Noto Sans Thai", sans-serif); font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.account-pill:hover { color: white; background: transparent; }
.account-pill[data-initial]::before { content: attr(data-initial); display: grid; flex: none; width: 24px; height: 24px; place-items: center; border-radius: 50%; color: white; background: var(--navy, #252B49); font-size: 13px; text-transform: uppercase; }
.account-pill[data-initial]:hover::before { color: var(--navy, #252B49); background: white; }
.menu-btn { display: none; }

@media (max-width: 1060px) {
    .topbar-inner { flex-wrap: wrap; gap: 0 10px; padding: 8px 14px 0; }
    .brand { gap: 10px; }
    .brand-title { font-size: 20px; }
    .brand-mark { width: 34px; height: 34px; font-size: 19px; }
    .brand-note { display: none; }
    .menu-btn { display: grid; width: 44px; height: 44px; padding: 0; place-items: center; border: 0; border-radius: 50%; color: white; background: transparent; }
    .menu-avatar { display: grid; width: 36px; height: 36px; place-items: center; border: 2px solid white; border-radius: 50%; font: 600 15px var(--heading-font, "Roboto", "Noto Sans Thai", sans-serif); text-transform: uppercase; }
    .menu-btn[aria-expanded="true"] .menu-avatar, .menu-btn.signed-in .menu-avatar { color: var(--navy, #252B49); background: white; }
    .top-nav { order: 3; flex: 0 0 100%; gap: 4px; margin: 0 -14px; padding: 0 8px; overflow-x: auto; scrollbar-width: none; }
    .top-nav::-webkit-scrollbar { display: none; }
    .top-nav .nav-link { display: inline-flex; min-height: 44px; align-items: center; padding: 0 10px; border-bottom: 3px solid transparent; font-size: 15px; }
    .top-nav .nav-link[aria-current="page"] { border-bottom-color: white; text-decoration: none; }
    .top-tools { position: absolute; top: calc(100% - 1px); right: 0; left: 0; display: none; grid-template-columns: 44px repeat(2, minmax(0, 1fr)); align-items: center; gap: 8px; padding: 14px; background: var(--navy, #252B49); box-shadow: 0 14px 28px rgb(0 0 0 / 30%); }
    .top-tools.open { display: grid; }
    .top-tools .wl-picker { position: static; display: block; min-width: 0; }
    .top-tools .wl-btn { box-sizing: border-box; width: 100%; min-height: 44px; padding: 0 8px; justify-content: center; }
    .top-tools .wl-btn > span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .top-tools .theme-toggle { width: 44px; min-height: 44px; padding: 0; justify-content: center; }
    .top-tools .wl-pop { position: absolute; top: calc(100% - 4px); right: 14px; left: 14px; width: auto !important; max-width: none; margin: 0; }
    .top-tools .account-pill { grid-column: 1 / -1; max-width: none; min-height: 44px; justify-content: center; order: -1; }
}
/* One consistent look for every dropdown on the site */
select:not([multiple]) { -webkit-appearance: none; appearance: none; min-height: 34px; padding-right: 30px !important; border: 1px solid var(--line, #d5d8dc); border-radius: 6px; color: var(--ink, #000); background-color: white !important; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23252B49' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important; background-repeat: no-repeat !important; background-position: right 10px center !important; background-size: 12px 8px !important; cursor: pointer; text-overflow: ellipsis; }
select:not([multiple]):disabled { opacity: .55; cursor: not-allowed; }
select:not([multiple]):focus { border-color: var(--navy, #252B49); box-shadow: 0 0 0 3px rgb(37 43 73 / 14%); outline: 0; }
/* iOS zooms into inputs below 16px */
@media (max-width: 760px) { input, select, textarea { font-size: 16px; } }
