/* Public header and phone menu (owner, 18 Nov 2026: "redesign the menu creatively but simple", sign-in as an icon with
   the language switch beside it, no button deformed by longer French or Spanish words). Loaded after skin.css. */

/* ---------- Header: language chip + round sign-in icon ---------- */
.lf-lang-chip {
    position: relative; display: inline-flex; align-items: center; gap: 5px;
    height: 38px; padding: 0 11px; border-radius: 999px;
    border: 1px solid var(--border-glass, rgba(148, 163, 184, .3));
    background: var(--bg-glass, rgba(148, 163, 184, .1)); color: var(--text-main);
    font-size: 12.5px; font-weight: 800; letter-spacing: .04em; cursor: pointer; flex-shrink: 0;
}
.lf-lang-chip[hidden] { display: none !important; }
.lf-lang-chip svg { width: 16px; height: 16px; color: var(--color-accent, #2563eb); }
.lf-lang-chip:hover, .lf-lang-chip:focus-within { border-color: var(--color-accent, #2563eb); }
.lf-lang-chip select, .lfm-lang select {
    position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer;
    font-size: 16px; /* no zoom on iOS */
}
html .nav-signin.nav-signin-icon {
    width: 40px; height: 40px; min-width: 40px; min-height: 40px; padding: 0 !important;
    display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
    border: 0; color: #fff; cursor: pointer; flex-shrink: 0;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .8);
}
html .nav-signin.nav-signin-icon svg { width: 20px; height: 20px; }
html .nav-signin.nav-signin-icon:hover { filter: brightness(1.08); }
html .nav-signin.nav-signin-icon:focus-visible { outline: 2px solid var(--color-accent, #2563eb); outline-offset: 2px; }

/* Header buttons never wrap: long labels give way to the menu on smaller screens */
.topnav-actions .nav-cta { white-space: nowrap; }
@media (max-width: 1280px) {
    html:not([lang="en"]) .topnav-actions .nav-cta-2 { display: none !important; }
}

/* ---------- Phone menu ---------- */
html[data-theme] .mobile-drawer .lfm-prefs {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
    padding: 12px 16px; border-bottom: 1px solid var(--border-glass);
}
html[data-theme] .mobile-drawer .lfm-prefs:not(:has(.lfm-lang:not([hidden]))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
html[data-theme] .mobile-drawer .lfm-pref {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 58px; padding: 8px 6px; border-radius: 14px;
    border: 1px solid var(--border-glass); background: var(--bg-alt); color: var(--text-main);
    font: inherit; font-size: 12px; font-weight: 700; line-height: 1.2; text-align: center; cursor: pointer;
}
html[data-theme] .mobile-drawer .lfm-pref[hidden] { display: none; }
html[data-theme] .mobile-drawer .lfm-pref:hover, html[data-theme] .mobile-drawer .lfm-pref:focus-within { border-color: var(--color-accent); }
html[data-theme] .mobile-drawer .lfm-pref svg { width: 19px; height: 19px; color: var(--color-accent); }
html[data-theme] .mobile-drawer .lfm-pref > span { max-width: 100%; overflow-wrap: anywhere; }
html[data-theme] .mobile-drawer .lfm-pref .zoom-badge {
    position: absolute; top: 6px; right: 6px; font-size: 10px; padding: 1px 5px; border-radius: 999px;
    background: var(--color-accent); color: var(--accent-ink, #fff);
}

/* Main destinations: a 2 x 3 grid of tiles, the first one in brand blue */
html[data-theme] .mobile-drawer .lfm-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 4px 0 14px; }
html[data-theme] .mobile-drawer .lfm-tile {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px;
    min-height: 82px; padding: 12px !important; margin: 0 !important; border-radius: 16px;
    border: 1px solid var(--border-glass); background: var(--bg-card);
}
html[data-theme] .mobile-drawer .lfm-tile .drawer-link-title { font-size: 14px; font-weight: 800; line-height: 1.25; overflow-wrap: anywhere; }
html[data-theme] .mobile-drawer .lfm-tile .drawer-link-icon-box { width: 34px; height: 34px; border-radius: 11px; }
html[data-theme] .mobile-drawer .lfm-tile.highlight-link { border-color: var(--color-accent); }
html[data-theme] .mobile-drawer .lfm-tile-main { background: linear-gradient(135deg, #3b82f6, #1d4ed8); border-color: transparent; }
html[data-theme] .mobile-drawer .lfm-tile-main .drawer-link-title { color: #fff; }
html[data-theme] .mobile-drawer .lfm-tile-main .drawer-link-icon-box { background: rgba(255, 255, 255, .18); color: #fff; }

/* The rest: tidy one-line rows */
html[data-theme] .mobile-drawer .lfm-row { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 6px 10px !important; border-radius: 12px; }
html[data-theme] .mobile-drawer .lfm-row .drawer-link-icon-box { width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0; }
html[data-theme] .mobile-drawer .lfm-row .drawer-link-title { font-size: 14px; font-weight: 700; line-height: 1.3; }

html[data-theme] .mobile-drawer .lfm-legal { display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 6px 4px; font-size: 12.5px; }
html[data-theme] .mobile-drawer .lfm-legal a { color: var(--text-muted); text-decoration: none; }
html[data-theme] .mobile-drawer .lfm-legal a:hover { color: var(--color-accent); }

/* Footer: a compact sign-in and the main button; labels wrap cleanly instead of breaking the pill */
html[data-theme] .mobile-drawer-footer.lfm-foot { display: flex; flex-direction: row !important; gap: 8px; }
html[data-theme] .mobile-drawer-footer.lfm-foot .btn {
    flex: 1 1 0; min-width: 0; min-height: 46px !important; height: auto !important;
    padding: 8px 12px !important; border-radius: 14px; white-space: normal; line-height: 1.2; text-align: center;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
html[data-theme] .mobile-drawer-footer.lfm-foot .lfm-signin {
    flex: 0 0 auto; background: var(--bg-alt) !important; color: var(--text-main) !important;
    border: 1px solid var(--border-glass) !important;
}
html[data-theme] .mobile-drawer-footer.lfm-foot .lfm-signin svg { width: 18px; height: 18px; color: var(--color-accent); }
html[data-theme] .mobile-drawer-footer.lfm-foot .lfm-signin[hidden] { display: none !important; }

/* ---------- Long French and Spanish labels: buttons grow, they don't break ---------- */
html:not([lang="en"]) .btn { white-space: normal; height: auto; line-height: 1.25; }
html:not([lang="en"]) .btn-sm { min-height: 34px; }
html:not([lang="en"]) .btn-block { text-align: center; }

/* Small legal note under a translated page: the English text is the binding one */
.lf-legal-note { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--color-accent, #2563eb);
    background: var(--bg-alt, rgba(148, 163, 184, .08)); border-radius: 8px; font-size: 13px; color: var(--text-muted); }

@media (max-width: 380px) {
    .lf-lang-chip { padding: 0 9px; gap: 4px; }
}

/* Older rules size .theme-toggle-btn / .zoom-toggle-btn as 40px round icons and lay groups out as a 2-column grid */
html[data-theme] .mobile-drawer .lfm-prefs .lfm-pref { width: auto !important; height: auto !important; min-width: 0 !important; margin: 0 !important; }
html[data-theme] .mobile-drawer .mobile-drawer-group:has(.lfm-row) { display: flex !important; flex-direction: column; gap: 2px; }
html[data-theme] .mobile-drawer .mobile-drawer-group:has(.lfm-row) .mobile-drawer-group-title { margin: 6px 4px 4px; }
html[data-theme] .mobile-drawer .lfm-row { flex-direction: row !important; min-height: 46px !important; background: transparent; border: 0 !important; box-shadow: none !important; }
html[data-theme] .mobile-drawer .lfm-row:hover, html[data-theme] .mobile-drawer .lfm-row.highlight-link { background: var(--bg-alt) !important; }
html[data-theme] .mobile-drawer .lfm-prefs .zoom-badge {
    position: absolute !important; top: 5px !important; right: 5px !important; left: auto !important; bottom: auto !important;
    width: auto !important; height: auto !important; min-width: 0 !important; line-height: 1.3 !important;
    padding: 1px 5px !important; font-size: 10px !important; border-radius: 999px !important; transform: none !important;
}
html[data-theme] .mobile-drawer .lfm-row .drawer-link-title { flex: 1 1 auto; text-align: left !important; margin: 0 !important; }
html[data-theme] .mobile-drawer .lfm-tile .drawer-link-title { text-align: left !important; }

/* ---------- Language menu (i18n.js): replaces the browser's own dropdown ---------- */
.lf-lang-js select { display: none !important; }
.lf-lang-js { cursor: pointer; user-select: none; }
.lf-lang-js:focus-visible { outline: 2px solid var(--color-accent, #2563eb); outline-offset: 2px; }
.lf-lang-pop {
    position: fixed; z-index: 10050; min-width: 200px; padding: 6px;
    background: var(--bg-card, #fff); color: var(--text-main, #0f172a);
    border: 1px solid var(--border-glass, rgba(148, 163, 184, .3)); border-radius: 16px;
    box-shadow: 0 18px 44px -12px rgba(2, 6, 23, .35);
    animation: lfLangIn .14s ease-out;
}
@keyframes lfLangIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.lf-lang-pop-head { padding: 6px 10px 8px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted, #64748b); }
.lf-lang-pop button {
    display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 8px 10px;
    border: 0; border-radius: 11px; background: transparent; color: inherit; font: inherit; font-size: 14.5px; font-weight: 600;
    text-align: left; cursor: pointer;
}
.lf-lang-pop button:hover, .lf-lang-pop button:focus-visible { background: var(--bg-alt, rgba(148, 163, 184, .12)); outline: none; }
.lf-lang-pop-code {
    display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 26px; border-radius: 8px;
    font-size: 11.5px; font-weight: 800; letter-spacing: .04em;
    background: var(--bg-alt, rgba(148, 163, 184, .14)); color: var(--text-muted, #64748b);
}
.lf-lang-pop-name { flex: 1; }
.lf-lang-pop button.is-on { color: var(--color-accent, #2563eb); }
.lf-lang-pop button.is-on .lf-lang-pop-code { background: var(--color-accent, #2563eb); color: #fff; }
.lf-lang-pop svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
