/* ==========================================================================
   /app/themes/style.css — стили кнопки и окна выбора шаблона.
   2026-10-12. Проект API_X15RU. Общие для всех тем (не зависят от палитры).
   ========================================================================== */
.ja-themeswitcher{max-width:640px; margin:14px auto 8px; padding:0 12px; text-align:center}
.ja-themebtn{display:inline-block; padding:9px 16px; border-radius:10px; cursor:pointer;
  border:1px solid rgba(120,140,180,.35); background:rgba(30,40,70,.5); color:#dfe5ff;
  font-size:13px; font-family:inherit}
.ja-themebtn:active{transform:translateY(1px)}

.ja-thememodal{position:fixed; inset:0; z-index:1000; display:none}
.ja-thememodal.show{display:block}
.ja-thememodal-bg{position:absolute; inset:0; background:rgba(0,0,0,.6)}
.ja-thememodal-box{position:absolute; left:50%; top:50%; transform:translate(-50%,-50%);
  width:min(92vw,380px); background:#171b30; color:#eef1ff; border:1px solid #303760;
  border-radius:16px; padding:16px; box-shadow:0 18px 50px rgba(0,0,0,.5)}
.ja-thememodal-h{font-size:15px; font-weight:700; margin-bottom:12px}
.ja-thememodal-list{display:flex; flex-direction:column; gap:8px; margin-bottom:14px}
.ja-themeopt{display:flex; align-items:center; gap:10px; padding:12px 14px; border-radius:12px;
  background:#0f1330; border:1px solid #2a3160; cursor:pointer; font-size:15px}
.ja-themeopt.active{border-color:#f97316; background:rgba(249,115,22,.12)}
.ja-themeopt input{width:18px; height:18px; accent-color:#f97316; margin:0}
.ja-themeopt-t{flex:1}
.ja-themeopt-def{font-size:11px; color:#9aa3c7}
.ja-thememodal-foot{display:flex; gap:10px}
.ja-thememodal-apply{flex:1; padding:13px; border:0; border-radius:12px; cursor:pointer;
  font-size:15px; font-weight:700; color:#1a1206; background:linear-gradient(180deg,#ff8a2b,#f97316)}
.ja-thememodal-apply:disabled{opacity:.6}
.ja-thememodal-cancel{padding:13px 16px; border:1px solid #2a3160; border-radius:12px; cursor:pointer;
  font-size:15px; color:#c3c9ea; background:#0f1330}
.ja-thememodal-hint{margin-top:12px; font-size:12px; color:#9aa3c7; line-height:1.4}

/* ==========================================================================
   Нижнее меню приложения (общее для всех шаблонов).
   2026-10-12. База — тёмная; акцент/фон донастраивает тема (themes/<ключ>/style.css).
   Всегда прижато к нижнему краю экрана.
   ========================================================================== */
/* 2026-10-12: без env(safe-area-inset-bottom) — в WebView приложения он даёт лишние 44px
   (системная панель Android и так вне WebView), из-за чего под меню была пустая полоса */
.ja-botnav{position:fixed; left:0; right:0; bottom:0; z-index:100;
  display:flex; align-items:stretch;
  background:#141834; border-top:1px solid #262b52;
  padding:6px 4px 4px;
  margin:0; box-sizing:border-box}
.ja-botnav a,.ja-botnav-item{flex:1 1 0; min-width:0; display:flex; flex-direction:column;
  align-items:center; justify-content:center; gap:3px; padding:4px 2px;
  font-size:10.5px; line-height:1.1; color:#8b93bd; text-align:center;
  text-decoration:none; border:0; background:none}
.ja-botnav-ico{font-size:19px; line-height:1}
.ja-botnav-item.active,.ja-botnav a.active{color:#ff8a2b}

/* ==========================================================================
   Кнопки приложения: меньше и единообразно на ВСЕХ страницах (2026-10-12, владелец).
   Раньше базовый ui.css делал их крупными (19.2px). Уменьшаем — в 1,5 раза.
   Общее для всех шаблонов; размер по умолчанию сохранён в комментарии выше.
   ========================================================================== */
body button,body input[type=submit],body input[type=button],body input[type=reset],
body .btn,body .btn_menu,body .btn_blue{
  font-size:12.8px !important; padding:7px 10px !important; letter-spacing:.04em !important}
/* карточка заявки — то же (сохраняем явное правило для .ja-ordercard) */
.ja-ordercard button,.ja-ordercard .btn,.ja-ordercard .btn_menu,.ja-ordercard .btn_blue,
.ja-ordercard input[type=button],.ja-ordercard input[type=submit]{
  font-size:12.8px !important; padding:7px 10px !important; letter-spacing:.05em !important}
.ja-ordercard .ja-btn-take{font-size:14px !important; padding:10px 12px !important}
/* окно выбора шаблона — контролы оставляем читаемыми */
.ja-thememodal button{font-size:15px !important; padding:13px !important}

/* запас снизу, чтобы фиксированное меню не перекрывало контент страницы */
body,body.bg_dark,body.bg_gray{padding-bottom:64px !important}

/* ==========================================================================
   Тумблер настроек «как в радиусах и типах заявок» (.ja-sw).
   2026-10-12. Проект API_X15RU. Общий для всех тем — цвета берёт из переменных
   темы (--accent/--border/--dim). Включение/выключение — без перезагрузки,
   с подписью «Включено/Выключено» и анимацией бегунка.
   Разметка:
     <div class="ja-swrow" data-row>
       <div class="ja-swtxt"><div class="ja-swname">Название</div>
         <div class="ja-swst"><b class="st">Включено</b></div></div>
       <label class="ja-sw"><input type="checkbox"><span class="tr"></span></label>
     </div>
   ========================================================================== */
.ja-swrow{display:flex;align-items:center;gap:12px;padding:11px 0;
  border-bottom:1px solid rgba(120,140,190,.14)}
.ja-swrow:last-child{border-bottom:none}
.ja-swrow .ja-swtxt{flex:1;min-width:0}
.ja-swrow .ja-swname{font-size:14px;font-weight:600;line-height:1.25}
.ja-swrow .ja-swst{font-family:var(--mono,monospace);font-size:13px;color:var(--dim,#9aa3c7);
  letter-spacing:.04em;margin-top:2px}
.ja-swrow .ja-swst .st{font-weight:700;letter-spacing:.05em;color:var(--accent,#f97316)}
.ja-swrow.off .ja-swst .st{color:var(--danger,#ff5f63)}
.ja-swrow.off .ja-swname{color:var(--dim,#9aa3c7)}
.ja-sw{position:relative;flex:0 0 auto;width:46px;height:26px;display:inline-block}
.ja-sw input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;z-index:2}
.ja-sw .tr{position:absolute;inset:0;background:rgba(255,255,255,.07);
  border:1px solid var(--border,#262b52);transition:all .2s}
.ja-sw .tr::after{content:'';position:absolute;top:3px;left:3px;width:18px;height:18px;
  background:var(--dim,#9aa3c7);transition:all .2s}
.ja-sw input:checked + .tr{background:rgba(140,155,200,.35);border-color:var(--accent,#f97316)}
.ja-sw input:checked + .tr::after{left:23px;background:var(--accent,#f97316);
  box-shadow:0 0 10px var(--accent,#f97316)}
@media(max-width:360px){
  .ja-sw{width:42px;height:24px}
  .ja-sw .tr::after{width:16px;height:16px}
  .ja-sw input:checked + .tr::after{left:21px}
}
