/* ╔══════════════════════════════════════════════════════════════════╗
   ║   Loongdingxuan — country picker and header switcher              ║
   ║   Loaded by every page. Inherits each page's own colour tokens,   ║
   ║   with fallbacks so it also works on the dark operations pages.   ║
   ╚══════════════════════════════════════════════════════════════════╝ */

.ldx-picker {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(8, 14, 11, 0.86);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    animation: ldxFade 0.35s ease-out;
}
@keyframes ldxFade { from { opacity: 0; } to { opacity: 1; } }

.ldx-picker-card {
    width: 100%;
    max-width: 440px;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 28px;
    background: var(--bg-sec, var(--bg-surface, #1e3a2f));
    border: 1px solid var(--border, var(--border-thin, rgba(210, 166, 122, 0.22)));
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.55);
    animation: ldxRise 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ldxRise { from { opacity: 0; transform: translateY(22px) scale(0.97); } to { opacity: 1; transform: none; } }

.ldx-picker-logo { width: 74px; height: auto; margin-bottom: 1.2rem; object-fit: contain; }

.ldx-picker-card h2 {
    margin: 0 0 0.6rem;
    font-size: 1.5rem;
    line-height: 1.25;
    color: var(--text-main, #F5EDD8);
}
.ldx-picker-card p {
    margin: 0 0 1.8rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted, #b8a890);
}

.ldx-picker-list { display: flex; flex-direction: column; gap: 0.7rem; }

.ldx-country {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0.95rem 1.1rem;
    border-radius: 16px;
    cursor: pointer;
    text-align: start;
    font: inherit;
    color: var(--text-main, #F5EDD8);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border, rgba(210, 166, 122, 0.22));
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.ldx-country:hover,
.ldx-country:focus-visible {
    transform: translateY(-2px);
    border-color: var(--accent, #D2A67A);
    background: rgba(210, 166, 122, 0.1);
    outline: none;
}

.ldx-flag { font-size: 1.7rem; line-height: 1; flex-shrink: 0; }
.ldx-country-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ldx-country-name { font-size: 0.98rem; font-weight: 700; }
.ldx-country-sub { font-size: 0.76rem; color: var(--text-muted, #b8a890); }

/* Header chip */
.ldx-switcher {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    cursor: pointer;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--text-muted, #b8a890);
    background: transparent;
    border: 1px solid var(--border, var(--border-thin, rgba(210, 166, 122, 0.22)));
    transition: all 0.3s ease;
}
.ldx-switcher:hover {
    color: #fff;
    border-color: transparent;
    background: var(--gradient, linear-gradient(135deg, #D2A67A 0%, #b8865a 100%));
}
.ldx-switcher .ldx-flag { font-size: 1rem; }
@media (max-width: 560px) {
    .ldx-switcher-name { display: none; }
    .ldx-switcher { padding: 4px 9px; }
}

/* Branch with no online menu yet */
.ldx-offline {
    max-width: 560px;
    margin: 3rem auto;
    padding: 2.5rem 2rem;
    text-align: center;
    border-radius: 24px;
    background: var(--bg-card, var(--bg-sec, #244035));
    border: 1px solid var(--border, rgba(210, 166, 122, 0.22));
}
.ldx-offline h3 { margin: 0 0 0.7rem; font-size: 1.3rem; color: var(--text-main, #F5EDD8); }
.ldx-offline p { margin: 0 0 1.6rem; font-size: 0.9rem; line-height: 1.7; color: var(--text-muted, #b8a890); }
.ldx-offline-phones { display: flex; flex-direction: column; gap: 0.6rem; align-items: center; }
.ldx-offline-phones a {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    color: #fff;
    text-decoration: none;
    background: var(--gradient, linear-gradient(135deg, #D2A67A 0%, #b8865a 100%));
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.ldx-offline-phones a:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(210, 166, 122, 0.35); }
