/* Privatka CRM — the language drop-down (#2744, views/partials/lang_select.php + public/js/lang-select.js). The list itself
   is the v2 one (v2-select.css); here only how it sits in each place. Native names in CJK / Devanagari use the system
   fonts: the stacks below end in the platforms' own fonts for them (the option carries its lang, so the browser picks). */
.pv-lang { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.pv-lang-ic { flex-shrink: 0; color: var(--v2-text-3, #8e8e93); }
.pv-lang .v2-select { min-width: 0; }
.pv-lang select.pv-lang-sel:not(.v2-select-native) { max-width: 100%; font: inherit; }   /* without the script: the browser's list */
.pv-lang .v2-select-btn, .v2-select-pop .v2-select-opt {
    font-family: var(--v2-font, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif), "PingFang SC", "Hiragino Sans", "Apple SD Gothic Neo",
        "Microsoft YaHei", "Yu Gothic UI", "Malgun Gothic", "Nirmala UI", "Kohinoor Devanagari", "Noto Sans CJK SC", "Noto Sans Devanagari", sans-serif;
}

/* the sidebar's profile menu: a row like its items — the globe, «Language» is the list's own name */
.pv-lang--menu { display: flex; width: 100%; box-sizing: border-box; padding: 4px 8px 4px 12px; gap: 10px; color: var(--text-secondary); }
.pv-lang--menu .pv-lang-ic { color: currentColor; }
.pv-lang--menu .v2-select { flex: 1; }
.pv-lang--menu .v2-select-btn { width: 100%; height: 30px; padding: 0 8px 0 10px; border-radius: 7px; font-size: 13px; background: transparent; color: var(--text-secondary); }
.pv-lang--menu .v2-select-btn:hover { background: var(--bg-sidebar-hover); color: var(--text-primary); }
body.dark-theme .pv-lang--menu .v2-select-btn { border-color: rgba(255, 255, 255, .1); }

/* Settings → Appearance: the row has its label already */
.pv-lang--settings .pv-lang-ic { display: none; }
.pv-lang--settings .v2-select-btn { min-width: 160px; }

/* the sign-in / sign-up pages and the landing: small, quiet, at the top */
.pv-lang--auth .v2-select-btn, .pv-lang--landing .v2-select-btn { height: 30px; padding: 0 8px 0 10px; font-size: 13px; background: transparent; border-color: transparent; color: var(--v2-text-2, #6e6e73); }
.pv-lang--auth .v2-select-btn:hover, .pv-lang--landing .v2-select-btn:hover { border-color: var(--v2-line-2, rgba(0, 20, 60, .13)); color: var(--v2-text, #1d1d1f); }
.pv-lang--landing { color: inherit; }
.pv-lang--landing .v2-select-btn { color: inherit; }
@media (pointer: coarse) { .pv-lang--menu .v2-select-btn, .pv-lang--auth .v2-select-btn, .pv-lang--landing .v2-select-btn { height: 36px; } }

/* #2744 the landing / FAQ nav on a phone: the drop-down is a globe button like the theme button next to it (the list
   opens the same); the language's name took the room of the menu button */
@media (max-width: 720px) {
    .l-nav-cta .pv-lang--landing { position: relative; flex: none; width: 38px; height: 38px; justify-content: center; gap: 0;
        border: 1px solid var(--l-border); border-radius: 11px; background: var(--l-card); color: var(--l-text-dim); }   /* as .l-icon-btn */
    .l-nav-cta .pv-lang--landing:hover { color: var(--l-text-strong); background: var(--l-card-hover); }
    .l-nav-cta .pv-lang--landing .pv-lang-ic { color: currentColor; }
    .l-nav-cta .pv-lang--landing .v2-select { position: absolute; inset: 0; border-radius: inherit; }
    .l-nav-cta .pv-lang--landing .v2-select-btn { width: 100%; height: 100%; padding: 0; border: 0; border-radius: inherit; background: transparent; }
    .l-nav-cta .pv-lang--landing .v2-select-btn:hover { background: transparent; }
    .l-nav-cta .pv-lang--landing .v2-select-val, .l-nav-cta .pv-lang--landing .v2-select-chev { display: none; }
}
@media (max-width: 380px) { .l-nav-cta .pv-lang--landing { width: 34px; height: 34px; } }

/* #2744 the list of the landing / FAQ drop-down: the landing's own colours (its pages have no --v2-* tokens) in both
   themes; the list hangs off <body>, so body.landing-body (and it is loaded after v2-select.css) */
body.landing-body .v2-select-pop { background: #fff; border-color: var(--l-border); color: var(--l-text-strong); box-shadow: var(--l-shadow, 0 12px 32px rgba(0, 0, 0, .28)); }
body.landing-body.dark-theme .v2-select-pop { background: #141824; }   /* opaque: the page must not show through the names */
body.landing-body .v2-select-opt.is-active { background: var(--l-chip-strong); }
body.landing-body .v2-select-check { color: var(--l-accent-2, #2f6bff); }
