/* lk-mobile.css — мобильная навигация кабинета (09.11.2026, v2).
   Нижняя панель #lk-tabbar + шторка #lk-sheet. Пара к lk-mobile.js.
   Всё под html.lk-mob и @media < 1280px. */

#lk-tabbar, #lk-sheet, #lk-sheet-ov { display: none; }

@media (max-width: 1279px) {
  /* ---------- нижняя панель ---------- */
  html.lk-mob #lk-tabbar {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(9, 9, 11, .9);
    -webkit-backdrop-filter: blur(22px) saturate(1.4);
    backdrop-filter: blur(22px) saturate(1.4);
    border-top: 1px solid rgba(255, 255, 255, .07);
    transition: transform .25s cubic-bezier(.32, .72, 0, 1), opacity .2s;
  }
  html.lk-mob.lk-kb #lk-tabbar { transform: translateY(110%); opacity: 0; }

  #lk-tabbar .lkt-in {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    max-width: 560px; margin: 0 auto; padding: 6px 8px 5px;
  }
  #lk-tabbar .lkt-it {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    min-height: 54px; padding: 5px 2px 6px;
    border: 0; border-radius: 14px; background: none;
    color: rgba(255, 255, 255, .52);
    font-family: inherit; font-size: 11px; font-weight: 500; line-height: 1.1; letter-spacing: 0;
    text-decoration: none; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color .2s, background .2s, transform .15s;
  }
  #lk-tabbar .lkt-it:active { transform: scale(.94); }
  #lk-tabbar .lkt-it.is-active { color: #fff; background: rgba(255, 255, 255, .06); }
  #lk-tabbar .lkt-it.is-active .lkt-tx { font-weight: 600; }
  #lk-tabbar .lkt-ic { position: relative; display: flex; line-height: 0; }
  #lk-tabbar .lkt-tx { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

  /* «Купить» — обычная вкладка; выделяем только иконку, без плавающих кнопок */
  #lk-tabbar .lkt-main { color: rgba(255, 255, 255, .62); }
  #lk-tabbar .lkt-main.is-active { color: #fff; }

  #lk-tabbar .lkt-badge {
    position: absolute; top: -5px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 9px; background: #ef4444; color: #fff;
    font-family: inherit; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center;
    box-shadow: 0 0 0 2px rgba(9, 9, 11, 1);
  }
  #lk-tabbar .lkt-badge[hidden] { display: none; }

  /* ---------- шторка ---------- */
  html.lk-mob #lk-sheet-ov {
    display: block; position: fixed; inset: 0; z-index: 120;
    background: rgba(0, 0, 0, .72);
    -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
    opacity: 0; pointer-events: none; transition: opacity .25s;
  }
  html.lk-mob #lk-sheet {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 121;
    transform: translateY(105%);
    transition: transform .34s cubic-bezier(.22, 1, .36, 1), visibility .34s;
    will-change: transform;
    visibility: hidden; pointer-events: none;
  }
  html.lk-mob.lks-open #lk-sheet { transform: translateY(0); visibility: visible; pointer-events: auto; }
  html.lk-mob.lks-open #lk-sheet-ov { opacity: 1; pointer-events: auto; }
  html.lks-open body { overflow: hidden; }

  html.lk-mob #lk-sheet .lks-pnl {
    max-width: 560px; margin: 0 auto;
    background: #0c0c0e;
    border: 1px solid rgba(255, 255, 255, .08);
    border-bottom: 0;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .8);
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    max-height: 86dvh; overflow: hidden; display: flex; flex-direction: column;
  }
  html.lk-mob #lk-sheet .lks-grip {
    flex: none; width: 42px; height: 4px; margin: 9px auto 4px;
    border-radius: 4px; background: rgba(255, 255, 255, .18);
  }
  html.lk-mob #lk-sheet .lks-body { overflow-y: auto; padding: 6px 14px 4px; -webkit-overflow-scrolling: touch; }

  html.lk-mob #lk-sheet .lks-acc {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 4px 14px; margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
  }
  html.lk-mob #lk-sheet .lks-ava {
    flex: none; width: 42px; height: 42px; border-radius: 13px;
    display: grid; place-items: center; overflow: hidden;
    color: rgba(255, 255, 255, .62);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .09);
  }
  html.lk-mob #lk-sheet .lks-ava svg { width: 20px; height: 20px; }
  html.lk-mob #lk-sheet .lks-ava.has-img { border-color: rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .04); }
  html.lk-mob #lk-sheet .lks-ava img { width: 100%; height: 100%; object-fit: cover; display: block; }
  html.lk-mob #lk-sheet .lks-acc-t { flex: 1; min-width: 0; }
  html.lk-mob #lk-sheet .lks-acc-t b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  html.lk-mob #lk-sheet .lks-acc-t span { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(255, 255, 255, .42); }
  html.lk-mob #lk-sheet .lks-out {
    flex: none; display: grid; place-items: center; width: 38px; height: 38px;
    border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px;
    background: rgba(255, 255, 255, .04); color: rgba(255, 255, 255, .55);
    cursor: pointer; transition: color .2s, background .2s, border-color .2s;
  }
  html.lk-mob #lk-sheet .lks-out:hover { color: #f87171; border-color: rgba(248, 113, 113, .3); background: rgba(248, 113, 113, .08); }

  html.lk-mob #lk-sheet .lks-grid {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px;
    padding: 4px 0 10px;
  }
  html.lk-mob #lk-sheet .lks-it {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px; border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    color: rgba(255, 255, 255, .82); text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    transition: background .18s, border-color .18s, transform .15s;
  }
  html.lk-mob #lk-sheet .lks-it:active { transform: scale(.97); }
  html.lk-mob #lk-sheet .lks-it:hover { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); }
  html.lk-mob #lk-sheet .lks-ic { position: relative; display: flex; color: rgba(255, 255, 255, .7); }
  html.lk-mob #lk-sheet .lks-lb { flex: 1; min-width: 0; font-size: 13px; font-weight: 500; line-height: 1.25; }
  html.lk-mob #lk-sheet .lks-ar { display: flex; color: rgba(255, 255, 255, .18); }
  html.lk-mob #lk-sheet .lks-bdg {
    position: absolute; top: -7px; right: -8px; min-width: 16px; height: 16px; padding: 0 4px;
    border-radius: 8px; background: #ef4444; color: #fff;
    font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  }
  html.lk-mob #lk-sheet .lks-sep { height: 1px; margin: 10px 2px 8px; background: rgba(255, 255, 255, .07); }
  html.lk-mob #lk-sheet .lks-admin { margin-top: 2px; background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .11); }
  html.lk-mob #lk-sheet .lks-admin .lks-ic { color: rgba(255, 255, 255, .85); }
  html.lk-mob #lk-sheet .lks-foot { padding: 4px 0 6px; text-align: center; font-size: 11px; color: rgba(255, 255, 255, .22); letter-spacing: .04em; }

  /* ---------- светлая тема ---------- */
  html.light.lk-mob #lk-tabbar { background: rgba(255, 255, 255, .92); border-top-color: rgba(0, 0, 0, .07); }
  html.light.lk-mob #lk-tabbar .lkt-it { color: rgba(0, 0, 0, .5); }
  html.light.lk-mob #lk-tabbar .lkt-it.is-active { color: #111; background: rgba(0, 0, 0, .05); }

  html.light.lk-mob #lk-tabbar .lkt-badge { box-shadow: 0 0 0 2px #fff; }
  html.light.lk-mob #lk-sheet-ov { background: rgba(0, 0, 0, .35); }
  html.light.lk-mob #lk-sheet .lks-pnl { background: #fff; border-color: rgba(0, 0, 0, .08); }
  html.light.lk-mob #lk-sheet .lks-grip { background: rgba(0, 0, 0, .16); }
  html.light.lk-mob #lk-sheet .lks-acc { border-bottom-color: rgba(0, 0, 0, .06); }
  html.light.lk-mob #lk-sheet .lks-ava { color: rgba(0, 0, 0, .55); background: rgba(0, 0, 0, .05); border-color: rgba(0, 0, 0, .09); }
  html.light.lk-mob #lk-sheet .lks-acc-t b { color: #111; }
  html.light.lk-mob #lk-sheet .lks-acc-t span { color: rgba(0, 0, 0, .45); }
  html.light.lk-mob #lk-sheet .lks-out { border-color: rgba(0, 0, 0, .1); background: rgba(0, 0, 0, .04); color: rgba(0, 0, 0, .5); }
  html.light.lk-mob #lk-sheet .lks-it { background: rgba(0, 0, 0, .03); border-color: rgba(0, 0, 0, .07); color: rgba(0, 0, 0, .8); }
  html.light.lk-mob #lk-sheet .lks-it:hover { background: rgba(0, 0, 0, .05); }
  html.light.lk-mob #lk-sheet .lks-ic { color: rgba(0, 0, 0, .6); }
  html.light.lk-mob #lk-sheet .lks-ar { color: rgba(0, 0, 0, .2); }
  html.light.lk-mob #lk-sheet .lks-foot { color: rgba(0, 0, 0, .25); }
  html.light.lk-mob #lk-sheet .lks-sep { background: rgba(0, 0, 0, .07); }
  html.light.lk-mob #lk-sheet .lks-admin { background: rgba(0, 0, 0, .04); border-color: rgba(0, 0, 0, .1); }
  html.light.lk-mob #lk-sheet .lks-admin .lks-ic { color: rgba(0, 0, 0, .75); }

  /* старое меню (кнопка + выезжающая панель) на мобилке полностью убрано:
     остаётся только новая нижняя панель и шторка #lk-sheet */
  html.lk-mob #root .lk-menu-btn,
  html.lk-mob #root .lk-drawer,
  html.lk-mob #root .lk-drawer-overlay { display: none !important; opacity: 0 !important; pointer-events: none !important; }

  /* место под панель */
  html.lk-mob #root main { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  html.lk-mob #lk-cab-footer { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)) !important; }
  html.lk-mob [data-sonner-toaster][data-y-position="bottom"] { bottom: calc(96px + env(safe-area-inset-bottom, 0px)) !important; }
  /* баннер куки — над панелью, а не поверх неё (перебиваем kabinet-skin) */
  html.lk-mob body div.fixed.bottom-6.left-6.z-\[100\] { bottom: calc(84px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---------------- телефоны ---------------- */
@media (max-width: 767px) {
  html.lk-mob #root main :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) { font-size: 16px !important; }

  html.lk-mob #root .pg-head-row {
    display: flex !important; flex-direction: row !important; align-items: center !important;
    justify-content: space-between !important; gap: 12px !important; text-align: left !important;
  }
  html.lk-mob #root .pg-head-row .pg-page-head { text-align: left !important; align-items: flex-start !important; min-width: 0; }
  html.lk-mob #root .pg-head-row > .pg-btn { width: auto !important; flex: 0 0 auto; padding: 9px 14px !important; border-radius: 12px !important; margin: 0 0 2px !important; }
  html.lk-mob #root :is(.pg-page-head, .bl5-head, .lc-st-head) h1 { font-size: 26px !important; line-height: 1.15 !important; }
  html.lk-mob #root :is(.pg-page-head, .bl5-head, .lc-st-head) { margin-bottom: 18px !important; }

  html.lk-mob #root .pg-banner { padding: 20px 18px !important; min-height: 0 !important; }
  html.lk-mob #root .pg-banner h1 { font-size: 24px !important; line-height: 1.15 !important; }
  html.lk-mob #root .pg-banner p { font-size: 14px !important; margin-top: 8px !important; }
  html.lk-mob #root .lc-dban-btns { display: flex !important; flex-wrap: wrap; gap: 8px !important; margin-top: 16px !important; }
  html.lk-mob #root .lc-dban-btns > a { flex: 1 1 auto; justify-content: center; padding: 10px 14px !important; font-size: 13px !important; }
  html.lk-mob #root .lc-dban-btns > .lc-dban-pri { flex-basis: 100%; }

  html.lk-mob #root :is(.cz-stats, .bl5-stats) { gap: 10px !important; }
  html.lk-mob #root :is(.cz-stat, .bl5-stat) { padding: 14px !important; min-height: 0 !important; }
  html.lk-mob #root :is(.cz-stat-v, .bl5-stat > b) { font-size: 22px !important; }

  html.lk-mob #root .pg-sec-head2 { gap: 10px; }
  html.lk-mob #root .pg-sec-head2 .pg-section-title { font-size: 20px !important; }
  html.lk-mob #root .pg-grid { gap: 12px !important; }
  html.lk-mob #root .svc-card { padding: 16px !important; }
  html.lk-mob #root .bl5-card { padding: 18px 16px !important; }
  html.lk-mob #root .pg-row { flex-wrap: wrap !important; }

  /* на очень узких экранах — одна колонка в шторке */
  html.lk-mob #lk-sheet .lks-grid { grid-template-columns: minmax(0, 1fr); }
  html.lk-mob #lk-sheet .lks-it { padding: 12px; }
}
@media (max-width: 360px) {
  html.lk-mob #lk-tabbar .lkt-it { font-size: 10px; min-height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  html.lk-mob #lk-tabbar, html.lk-mob #lk-sheet, html.lk-mob #lk-sheet-ov { transition: none !important; }
}
