/*
 * STOP SMOKE — ЕДИНЫЙ хедер лэндинга (главная + продукты + новости + книга).
 * Тёмная тема, шрифт Ruberoid. Подключается из 'self' (assets/).
 * Внутри ТОЛЬКО компонент хедера/меню/тостов — никаких глобальных сбросов
 * (body/*, box-sizing и т.п.), поэтому файл безопасно линковать и на «архивные»
 * страницы лэндинга (index/uz/eng/payday), не ломая их собственную вёрстку.
 */

:root { --ssh-navy:#071222; --ssh-navy2:#0e1c30; --ssh-red:#F14A41; --ssh-h:56px; }

/* ======================= Верхняя панель ======================= */
.ss-uni-header{
  position:sticky; top:0; left:0; right:0; z-index:2147483000;
  display:flex; align-items:center; gap:14px;
  height:var(--ssh-h); padding:0 clamp(12px,4vw,40px);
  background:rgba(4,11,22,.94); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px);
  border-bottom:1px solid rgba(255,255,255,.08);
  font-family:'Ruberoid',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  box-sizing:border-box;
}
/* На «архивных» страницах десктоп-хедер — родной, поэтому наш нужен ТОЛЬКО на мобильных
   и обязательно fixed (поверх абсолютной вёрстки архива, без сдвига потока). */
.ss-uni-header.only-mobile{ position:fixed; }
@media (min-width:901px){ .ss-uni-header.only-mobile{ display:none; } }

.ss-uni-header *{ box-sizing:border-box; }
/* Якорные переходы к разделам (#CEOinfo и т.п.) не должны прятаться под фиксированным/липким хедером. */
:target{ scroll-margin-top:calc(var(--ssh-h) + 10px); }
.ss-uni-logo{ display:inline-flex; align-items:center; margin-right:auto; flex:0 1 auto; min-width:0; }
/* Логотип — широкий вордмарк (≈6.4:1). На десктопе задаём высоту, на мобильных ограничиваем ШИРИНУ
   (height:auto), иначе он занимает пол-экрана и наезжает на кнопки. */
.ss-uni-logo img{ height:30px; width:auto; max-width:100%; display:block; }

/* ---- Десктоп-навигация (ссылки на разделы) ---- */
.ss-uni-links{ display:flex; align-items:center; gap:clamp(6px,1vw,14px); }
.ss-uni-links a{ color:#fff; text-decoration:none; font-size:13px; font-weight:500; letter-spacing:.01em; opacity:.9; white-space:nowrap; }
.ss-uni-links a:hover, .ss-uni-links a.active{ color:var(--ssh-red); opacity:1; }

/* ---- Кнопки Войти / Регистрация (всегда в шапке) ---- */
.ss-uni-btn{ display:inline-block; padding:8px 15px; border-radius:10px; text-decoration:none; font-weight:600; font-size:14px; white-space:nowrap; line-height:1; }
/* Цвета кнопок скопированы под .ss-uni-header, чтобы перебить `.client-body a{color:red}` (strict-CSP
   кабинет входа/регистрации) — иначе текст красной кнопки «Регистрация» становится красным на красном. */
.ss-uni-header .ss-uni-login{ border:1px solid rgba(255,255,255,.6); color:#fff; background:transparent; }
.ss-uni-header .ss-uni-reg{ background:var(--ssh-red); color:#fff; box-shadow:0 6px 18px rgba(241,74,65,.35); }
.ss-uni-header .ss-uni-login:hover{ border-color:#fff; }
.ss-uni-header .ss-uni-reg:hover{ filter:brightness(1.06); }

/* ---- Переключатель языка (десктоп) ---- */
details.ss-uni-lang{ position:relative; }
details.ss-uni-lang > summary{ list-style:none; cursor:pointer; color:#fff; font-weight:600; font-size:14px; padding:8px 12px; border:1px solid rgba(255,255,255,.25); border-radius:10px; user-select:none; white-space:nowrap; }
details.ss-uni-lang > summary::-webkit-details-marker{ display:none; }
details.ss-uni-lang > summary::after{ content:' ▾'; opacity:.7; }
details.ss-uni-lang[open] > summary{ border-color:var(--ssh-red); }
details.ss-uni-lang .ss-uni-lang-menu{ position:absolute; right:0; top:calc(100% + 6px); background:var(--ssh-navy2); border:1px solid rgba(255,255,255,.12); border-radius:10px; overflow:hidden; min-width:120px; box-shadow:0 12px 30px rgba(0,0,0,.4); }
details.ss-uni-lang .ss-uni-lang-menu a{ display:block; padding:10px 16px; text-decoration:none; color:#fff; font-size:14px; }
details.ss-uni-lang .ss-uni-lang-menu a:hover{ background:rgba(241,74,65,.18); }
details.ss-uni-lang .ss-uni-lang-menu a.cur{ color:var(--ssh-red); font-weight:700; }

/* ---- Бургер ---- */
.ss-uni-burger{ display:none; width:42px; height:42px; padding:10px; border:0; background:transparent; cursor:pointer; flex:0 0 auto; }
.ss-uni-burger span{ display:block; height:2px; border-radius:2px; background:#fff; transition:transform .22s ease, opacity .22s ease; }
.ss-uni-burger span + span{ margin-top:5px; }
.ss-uni-burger[aria-expanded="true"] span:nth-child(1){ transform:translateY(7px) rotate(45deg); }
.ss-uni-burger[aria-expanded="true"] span:nth-child(2){ opacity:0; }
.ss-uni-burger[aria-expanded="true"] span:nth-child(3){ transform:translateY(-7px) rotate(-45deg); }

/* ======================= Выпадающая навигация (мобильные) ======================= */
.ss-uni-panel{
  position:fixed; top:var(--ssh-h); left:0; right:0; bottom:0; z-index:2147482000;
  background:rgba(4,11,22,.985); -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px);
  overflow-y:auto; overscroll-behavior:contain;
  padding:8px clamp(18px,7vw,44px) 44px;
  font-family:'Ruberoid',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  opacity:0; visibility:hidden; transform:translateY(-10px);
  transition:opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.ss-uni-panel.open{ opacity:1; visibility:visible; transform:none; transition:opacity .22s ease, transform .22s ease; }
.ss-uni-panel a{ display:block; color:#fff; text-decoration:none; font-size:clamp(18px,5.5vw,22px); font-weight:600; letter-spacing:.01em; padding:16px 2px; border-bottom:1px solid rgba(255,255,255,.07); }
.ss-uni-panel a:hover, .ss-uni-panel a:active{ color:var(--ssh-red); }
.ss-uni-panel-lang{ display:flex; gap:10px; margin-top:22px; }
.ss-uni-panel-lang a{ flex:1 1 0; text-align:center; border:1px solid rgba(255,255,255,.22); border-radius:10px; font-size:15px; padding:12px 4px; }
.ss-uni-panel-lang a.cur{ border-color:var(--ssh-red); color:var(--ssh-red); }

/* ======================= Адаптив ======================= */
@media (max-width:900px){
  .ss-uni-links, details.ss-uni-lang{ display:none; }
  .ss-uni-burger{ display:block; }
  .ss-uni-btn{ padding:7px 12px; font-size:13px; }
  .ss-uni-logo img{ height:auto; max-width:132px; }
}
@media (max-width:430px){
  .ss-uni-header{ gap:8px; padding:0 12px; }
  .ss-uni-logo img{ max-width:104px; }
  .ss-uni-btn{ padding:6px 10px; font-size:12px; border-radius:9px; }
  .ss-uni-burger{ width:38px; height:38px; padding:9px; }
}
@media (max-width:360px){
  .ss-uni-header{ gap:6px; }
  .ss-uni-logo img{ max-width:84px; }
  .ss-uni-btn{ padding:5px 8px; font-size:11px; }
  .ss-uni-burger{ width:34px; height:34px; padding:8px; }
}
/* Контент-страницы несут все 7 пунктов меню + язык + 2 кнопки; в узбекском подписи длинные и не влезают
   при ~1280px, поэтому сворачиваем в бургер раньше (≤1180) — полное меню показываем, только когда оно реально помещается. */
@media (max-width:1180px){
  .ss-uni-header--content .ss-uni-links,
  .ss-uni-header--content details.ss-uni-lang{ display:none; }
  .ss-uni-header--content .ss-uni-burger{ display:block; }
}
/* Панель всегда в DOM (скрыта через visibility/opacity); открыть её можно только видимым бургером,
   поэтому на десктопе, где бургер display:none, меню недоступно — отдельный media-переключатель не нужен. */

/* ======================= Тост-уведомления (после форм) ======================= */
.ss-toast-wrap{ position:fixed; top:calc(var(--ssh-h) + 12px); left:50%; transform:translateX(-50%); z-index:2147483600; display:flex; flex-direction:column; gap:10px; width:min(92vw,440px); pointer-events:none; }
.ss-toast{
  pointer-events:auto; display:flex; align-items:flex-start; gap:10px;
  padding:14px 16px; border-radius:12px; color:#fff; font-family:'Ruberoid',system-ui,sans-serif;
  font-size:15px; line-height:1.35; box-shadow:0 16px 40px rgba(0,0,0,.45);
  border:1px solid transparent; background:var(--ssh-navy2);
  animation:ss-toast-in .28s ease, ss-toast-out .4s ease 5s forwards;
}
.ss-toast.success{ background:rgba(23,94,45,.96); border-color:rgba(63,201,112,.55); }
.ss-toast.danger{ background:rgba(120,28,28,.96); border-color:rgba(241,74,65,.6); }
.ss-toast .ss-toast-ico{ flex:0 0 auto; font-size:18px; line-height:1.2; }
.ss-toast .ss-toast-msg{ flex:1 1 auto; }
.ss-toast .ss-toast-x{ flex:0 0 auto; cursor:pointer; border:0; background:transparent; color:rgba(255,255,255,.8); font-size:18px; line-height:1; padding:0 2px; }
.ss-toast .ss-toast-x:hover{ color:#fff; }
@keyframes ss-toast-in{ from{ opacity:0; transform:translateY(-12px); } to{ opacity:1; transform:none; } }
@keyframes ss-toast-out{ to{ opacity:0; transform:translateY(-12px); } }
@media (prefers-reduced-motion:reduce){
  .ss-toast{ animation:none; }
  .ss-uni-panel, .ss-uni-burger span{ transition:none; }
}
