/* Language popover (Dil seç) of the home page header. Moved out of index.php's inline <style> unchanged so the light pages share it:
   markup modules/public-pages/partials/language-popover.php, home behaviour in index.php, light page behaviour in light-site-header.js. */
        /* ── GLX GLASS POPOVER ──────────────────────────────────────── */
        #glx-backdrop {
            position: fixed; inset: 0;
            z-index: 99997;
            pointer-events: none;
        }
        #glx-backdrop.glx-open { pointer-events: all; }
        #glx-popover {
            position: fixed;
            z-index: 99999;
            min-width: 230px;
            max-width: 270px;
            background: rgba(10, 10, 10, 0.58);
            backdrop-filter: blur(36px) saturate(1.9);
            -webkit-backdrop-filter: blur(36px) saturate(1.9);
            border: 1px solid rgba(197, 160, 89, 0.22);
            border-radius: 16px;
            padding: 6px 0 8px;
            box-shadow: 0 24px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(197,160,89,0.07) inset;
            opacity: 0;
            transform: translateX(-50%) scale(0.93) translateY(-8px);
            transform-origin: top center;
            pointer-events: none;
            transition: opacity 0.18s ease, transform 0.2s cubic-bezier(0.34,1.3,0.64,1);
            scrollbar-width: none;
            overflow-y: auto;
            max-height: 70vh;
        }
        #glx-popover::-webkit-scrollbar { display: none; }
        #glx-popover.glx-open {
            opacity: 1;
            transform: translateX(-50%) scale(1) translateY(0);
            pointer-events: all;
        }
        #glx-popover.glx-bottom {
            transform-origin: bottom center;
            transform: translateX(-50%) scale(0.93) translateY(8px);
        }
        #glx-popover.glx-bottom.glx-open {
            transform: translateX(-50%) scale(1) translateY(0);
        }
        .glx-pop-title {
            font-size: 9px;
            letter-spacing: 3px;
            text-transform: uppercase;
            color: rgba(197,160,89,0.5);
            font-weight: 700;
            padding: 6px 16px 8px;
            border-bottom: 1px solid rgba(197,160,89,0.07);
            margin-bottom: 2px;
        }
        .glx-pop-row {
            position: relative;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 16px;
            text-decoration: none;
            overflow: hidden;
            border-left: 2px solid transparent;
            transition: border-color 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .glx-pop-row::before {
            content: '';
            position: absolute;
            left: 0; top: 0; bottom: 0;
            width: 0%;
            background: linear-gradient(90deg, rgba(197,160,89,0.1), transparent);
            transition: width 0.2s ease;
            pointer-events: none;
        }
        .glx-pop-row:hover::before { width: 100%; }
        .glx-pop-row.glx-selected {
            border-left-color: #c5a059;
        }
        .glx-pop-row.glx-selected::before {
            width: 100%;
        }
        .glx-pop-flag {
            width: 28px; height: 19px;
            flex-shrink: 0;
            border-radius: 3px;
            overflow: hidden;
            box-shadow: 0 1px 6px rgba(0,0,0,0.45);
        }
        .glx-pop-flag img {
            width: 100%; height: 100%;
            object-fit: cover;
            display: block;
        }
        .glx-pop-names {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 1px;
            min-width: 0;
        }
        .glx-pop-native {
            font-size: 13px;
            font-weight: 600;
            color: #e0e0e0;
            white-space: nowrap;
            transition: color 0.15s;
        }
        .glx-pop-sub {
            font-size: 9px;
            color: rgba(255,255,255,0.25);
            letter-spacing: 1.2px;
            text-transform: uppercase;
        }
        .glx-pop-row.glx-selected .glx-pop-native { color: #c5a059; }
        .glx-pop-check {
            width: 16px; height: 16px;
            border-radius: 50%;
            background: rgba(197,160,89,0.12);
            border: 1.5px solid rgba(197,160,89,0.5);
            display: flex; align-items: center; justify-content: center;
            flex-shrink: 0;
            opacity: 0;
            transition: opacity 0.15s;
        }
        .glx-pop-check svg { stroke: #c5a059; }
        .glx-pop-row.glx-selected .glx-pop-check { opacity: 1; }
        /* light mode */
        body.light-mode #glx-popover {
            background: rgba(248, 246, 242, 0.65);
            border-color: rgba(197,160,89,0.28);
        }
        body.light-mode .glx-pop-native { color: #1a1a1a; }
        body.light-mode .glx-pop-sub { color: rgba(0,0,0,0.3); }
        body.light-mode .glx-pop-row.glx-selected .glx-pop-native { color: #9a7a3a; }
        body.light-mode .glx-pop-title { color: rgba(154,122,58,0.6); border-bottom-color: rgba(197,160,89,0.12); }
