/* v275: til tanlagich (UZ · ЎЗ · RU · EN · TR) — har bir til o'z bayrog'i ranglarida */
.lzl { position: relative; display: inline-flex; flex-shrink: 0; z-index: 60; font-family: inherit; }
.lzl-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 9px 0 6px;
  border-radius: 999px; border: 1px solid var(--line, rgba(255,255,255,.14));
  background: var(--bg-elevated, rgba(255,255,255,.04)); color: var(--ink, #e6edf3);
  font: 600 .84rem/1 inherit; cursor: pointer; white-space: nowrap;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.lzl-btn:hover, .lzl.is-open .lzl-btn { border-color: var(--accent-green, #1DEF6A); box-shadow: 0 0 0 3px rgba(29,239,106,.14); }
.lzl-btn:active { transform: scale(.97); }
.lzl-chev { width: 14px; height: 14px; opacity: .7; transition: transform .2s; }
.lzl.is-open .lzl-chev { transform: rotate(180deg); }
.lzl-name { max-width: 92px; overflow: hidden; text-overflow: ellipsis; }

/* bayroq-belgi: qisqartma bayroq ranglari ustida */
.lzl-flag {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-width: 27px; height: 19px; padding: 0 3px; border-radius: 5px; overflow: hidden;
  font: 800 10.5px/1 Inter, system-ui, sans-serif; letter-spacing: .02em; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.75), 0 0 1px rgba(0,0,0,.9);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 1px 3px rgba(0,0,0,.35);
  flex-shrink: 0;
}
/* O'zbekiston: ko'k – oq – yashil, ingichka qizil chiziqlar */
.lzl-f-uz, .lzl-f-uzc {
  background: linear-gradient(180deg, #0099b5 0 31%, #ce1126 31% 35%, #ffffff 35% 65%, #ce1126 65% 69%, #1eb53a 69% 100%);
  color: #072b3a; text-shadow: 0 0 2px #fff, 0 0 3px #fff, 0 0 1px #fff;
}
.lzl-f-uzc { box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 0 0 1.5px var(--accent-green, #1DEF6A); }
/* Rossiya: oq – ko'k – qizil */
.lzl-f-ru { background: linear-gradient(180deg, #ffffff 0 33.3%, #0039a6 33.3% 66.6%, #d52b1e 66.6% 100%); }
/* Ingliz: ko'k fon, oq-qizil xoch */
.lzl-f-en {
  background:
    linear-gradient(90deg, transparent 42%, #ffffff 42% 45%, #c8102e 45% 55%, #ffffff 55% 58%, transparent 58%),
    linear-gradient(180deg, transparent 36%, #ffffff 36% 41%, #c8102e 41% 59%, #ffffff 59% 64%, transparent 64%),
    #012169;
}
/* Turkiya: qizil */
.lzl-f-tr { background: radial-gradient(circle at 30% 50%, rgba(255,255,255,.22) 0 4px, transparent 4.5px), #e30a17; }

.lzl-menu {
  position: absolute; top: calc(100% + 8px); right: 0; min-width: 176px; padding: 6px;
  border-radius: 14px; border: 1px solid var(--line, rgba(255,255,255,.14));
  background: var(--bg-elevated, #0d1712); color: var(--ink, #e6edf3);
  box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 0 1px rgba(29,239,106,.06);
  display: grid; gap: 2px; animation: lzl-in .16s ease-out;
}
.lzl-menu[hidden] { display: none; }
@keyframes lzl-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.lzl-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  color: inherit; text-decoration: none; font-size: .9rem; font-weight: 600; white-space: nowrap;
}
.lzl-item:hover, .lzl-item:focus-visible { background: rgba(29,239,106,.10); outline: none; }
.lzl-item-name { flex: 1; }
.lzl-check { width: 15px; height: 15px; color: var(--accent-green, #1DEF6A); visibility: hidden; }
.lzl-item.is-on { background: rgba(29,239,106,.12); }
.lzl-item.is-on .lzl-check { visibility: visible; }
[data-theme="light"] .lzl-menu { box-shadow: 0 16px 34px rgba(15,40,25,.16); }

/* sahifada joy topilmasa — burchakda suzuvchi */
.lzl-floating { position: fixed; top: 10px; right: 10px; z-index: 1200; }
.lzl-floating .lzl-btn { background: var(--bg-elevated, #0d1712); }

/* kichik ekranlar: faqat bayroq-belgi */
@media (max-width: 1180px) { .site-header .lzl-name, .app-header .lzl-name { display: none; } }
@media (max-width: 480px) {
  .lzl-btn { height: 34px; padding: 0 6px 0 5px; gap: 4px; }
  .lzl-name { display: none; }
  .lzl-flag { min-width: 24px; height: 17px; font-size: 9.5px; border-radius: 4px; }
  .lzl-chev { width: 12px; height: 12px; }
  .lzl-menu { min-width: 158px; }
  .lzl-item { padding: 8px 9px; font-size: .86rem; }
}
@media (max-width: 340px) {
  .lzl-btn { height: 32px; padding: 0 4px; }
  .lzl-chev { display: none; }
}

/* ==========================================================================
   v275: logotip — boyqush va "LongoUZ" yozuvi bir-biriga yaqinroq, yozuv biroz kichikroq
   ========================================================================== */
.brand, .sidebar-brand, .quiz-brand { gap: 4px !important; }
.brand { font-size: 1.14rem; }
.brand .lg-owl { height: 1.85rem; }
.sidebar-brand { font-size: 1.08rem; }
.sidebar-brand .lg-owl { height: 1.75rem; }
.footer-brand { font-size: 1.05rem; }
.lg-word { letter-spacing: -.03em; }

/* ==========================================================================
   v275: telefon sarlavhasi (430px dan J1 mini 320px gacha) — til tugmasi bilan ham sig'adi,
   hech narsa ekrandan chiqmaydi va ustma-ust tushmaydi
   ========================================================================== */
@media (max-width: 430px) {
  .site-header { gap: 6px !important; padding-left: 10px !important; padding-right: 10px !important; }
  .site-header .site-nav { gap: 5px !important; min-width: 0; }
  .site-header .brand { gap: 3px !important; flex: 0 1 auto; min-width: 0; }
  .site-header .brand .lg-owl, body.home .site-header .brand .lg-owl, body.auth-page .site-header .brand .lg-owl { height: 26px !important; }
  .site-header .brand .lg-word, body.home .site-header .brand .lg-word, body.auth-page .site-header .brand .lg-word { font-size: .86rem !important; }
  .site-header .lzl-btn, .app-header .lzl-btn { height: 30px; padding: 0 4px; gap: 0; }
  .site-header .lzl-chev, .app-header .lzl-chev { display: none; }
  .site-header .lzl-flag, .app-header .lzl-flag { min-width: 24px; height: 17px; }
  .site-nav .nav-sm { padding: 5px 8px !important; }
}
@media (max-width: 380px) {
  .site-nav .nav-sm { padding: 5px 7px !important; font-size: .68rem !important; }
  .site-header .brand .lg-word, body.home .site-header .brand .lg-word, body.auth-page .site-header .brand .lg-word { font-size: .8rem !important; }
}
@media (max-width: 350px) {
  .site-header { padding-left: 8px !important; padding-right: 8px !important; gap: 4px !important; }
  .site-header .site-nav { gap: 4px !important; }
  .site-nav .nav-sm { padding: 4px 6px !important; font-size: .64rem !important; }
  .site-header .lzl-btn { border: 0; background: transparent; padding: 0 2px; }
}
/* uzun tarjimalar tugma ichida sig'sin (qatorga o'tmasin, kesilmasin) */
.site-nav .nav-sm { white-space: nowrap; }

/* CSS ichidagi matn ("Yana" tugmasi) — tanlangan tilda */
html[lang="ru"] .app-sidebar .sidebar-nav .sidebar-burger::after { content: "Ещё"; }
html[lang="en"] .app-sidebar .sidebar-nav .sidebar-burger::after { content: "More"; }
html[lang="tr"] .app-sidebar .sidebar-nav .sidebar-burger::after { content: "Daha"; }
html[lang="uz-Cyrl"] .app-sidebar .sidebar-nav .sidebar-burger::after { content: "Яна"; }

/* v275: telefon pastki menyusi — uzun nomlar "..." bilan kesilmaydi, ikki qatorga o'raladi */
@media (max-width: 640px) {
  .app-sidebar .sidebar-nav .sb-lbl {
    white-space: normal !important; text-overflow: clip !important; overflow: hidden;
    display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    line-height: 1.12 !important; text-align: center; word-break: break-word; hyphens: auto;
    font-size: .58rem !important; max-height: 2.3em;
  }
}
@media (max-width: 360px) {
  .app-sidebar .sidebar-nav .sb-lbl { font-size: .54rem !important; }
}

/* Bosh sahifa mobil menyusi `.site-nav a` havolalarini yashiradi — til menyusidagi
   bandlar ham <a> bo'lgani uchun ular ham yashirinib qolardi. Kuchliroq selektor bilan qaytaramiz. */
.lzl .lzl-menu a.lzl-item,
body.home .site-header .site-nav .lzl .lzl-menu a.lzl-item { display: flex; color: var(--ink, #e6edf3); font-size: .9rem; }
@media (max-width: 430px) {
  .lzl .lzl-menu a.lzl-item,
  body.home .site-header .site-nav .lzl .lzl-menu a.lzl-item { font-size: .86rem; }
}
[data-theme="light"] .lzl .lzl-menu a.lzl-item { color: var(--ink, #10231a); }
