/* Sotiks Kit: оформление Практикума, перенесённое в тему.
   Здесь только то, чего не было в components.css: палитра обложек (hue-*), семантические «мягкие» цвета, свой скролл, флажки, список и календарь,
   окна подтверждения и ввода. Нижняя панель телефона и логотип живут в плагине custom-left-sidebar-redesign. Классы с префиксом sx- и области [data-sx] не затрагивают остальной портал. */

/* ---------- Палитра обложек: градиент --g1 → --g2 ---------- */
.hue-blue { --g1: var(--hue-blue-1); --g2: var(--hue-blue-2); } .hue-green { --g1: var(--hue-green-1); --g2: var(--hue-green-2); } .hue-amber { --g1: var(--hue-amber-1); --g2: var(--hue-amber-2); }
.hue-violet { --g1: var(--hue-violet-1); --g2: var(--hue-violet-2); } .hue-rose { --g1: var(--hue-rose-1); --g2: var(--hue-rose-2); } .hue-teal { --g1: var(--hue-teal-1); --g2: var(--hue-teal-2); }
.hue-sky { --g1: var(--hue-sky-1); --g2: var(--hue-sky-2); } .hue-lime { --g1: var(--hue-lime-1); --g2: var(--hue-lime-2); } .hue-pink { --g1: var(--hue-pink-1); --g2: var(--hue-pink-2); }
.hue-indigo { --g1: var(--hue-indigo-1); --g2: var(--hue-indigo-2); } .hue-slate { --g1: var(--hue-slate-1); --g2: var(--hue-slate-2); } .hue-red { --g1: var(--hue-red-1); --g2: var(--hue-red-2); }
.hue-orange { --g1: var(--hue-orange-1); --g2: var(--hue-orange-2); } .hue-emerald { --g1: var(--hue-emerald-1); --g2: var(--hue-emerald-2); } .hue-cyan { --g1: var(--hue-cyan-1); --g2: var(--hue-cyan-2); }
.hue-fuchsia { --g1: var(--hue-fuchsia-1); --g2: var(--hue-fuchsia-2); } .hue-brown { --g1: var(--hue-brown-1); --g2: var(--hue-brown-2); } .hue-gold { --g1: var(--hue-gold-1); --g2: var(--hue-gold-2); }
.sx-cover { background: linear-gradient(135deg, var(--g1, var(--brand)), var(--g2, var(--brand-hover))); color: #fff; }

/* ---------- Область приложения [data-sx] ---------- */
[data-sx] h1, [data-sx] h2, [data-sx] h3 { letter-spacing: -.01em; line-height: 1.25; text-wrap: balance; } /* шрифт заголовков задаётся в Customizer и приходит из base.css */
[data-sx], [data-sx] * { scrollbar-width: thin; scrollbar-color: rgb(110 116 140 / 45%) transparent; }
[data-sx] *::-webkit-scrollbar { width: 8px; height: 8px; } [data-sx] *::-webkit-scrollbar-track, [data-sx] *::-webkit-scrollbar-corner { background: transparent; } [data-sx] *::-webkit-scrollbar-button { display: none; }
[data-sx] *::-webkit-scrollbar-thumb { background: rgb(110 116 140 / 40%); border-radius: 99px; border: 2px solid transparent; background-clip: content-box; } [data-sx] *::-webkit-scrollbar-thumb:hover { background: rgb(110 116 140 / 70%); background-clip: content-box; }
:root[data-theme="dark"] [data-sx], :root[data-theme="dark"] [data-sx] * { scrollbar-color: rgb(150 158 190 / 38%) transparent; }
:root[data-theme="dark"] [data-sx] *::-webkit-scrollbar-thumb { background: rgb(150 158 190 / 34%); background-clip: content-box; }
[data-sx] input[type="checkbox"]:not(.switch input):not([data-native]) { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--border-default); border-radius: 7px; background: var(--bg-surface) center / 14px 14px no-repeat; cursor: pointer; vertical-align: middle; transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
[data-sx] input[type="checkbox"]:not(.switch input):not([data-native]):hover:not(:disabled) { border-color: var(--brand); }
[data-sx] input[type="checkbox"]:not(.switch input):not([data-native]):checked { background-color: var(--brand); border-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
[data-sx] input[type="checkbox"]:not(.switch input):not([data-native]):indeterminate { background-color: var(--brand); border-color: var(--brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round'%3E%3Cpath d='M6 12h12'/%3E%3C/svg%3E"); }
[data-sx] input[type="checkbox"]:not(.switch input):not([data-native]):focus-visible { outline: 0; box-shadow: var(--focus-ring); } [data-sx] input[type="checkbox"]:not(.switch input):not([data-native]):disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Список и дата (подмена <select> и <input type=date>) ---------- */
.sx-sel { position: relative; display: block; width: 100%; } .sx-sel.is-auto { display: inline-block; width: auto; min-width: 150px; }
[data-sx-done] { display: none !important; }
.sx-sel-b { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; margin: 0 !important; height: 38px; padding: 0 var(--space-3); text-align: left; cursor: pointer; font: inherit; font-size: var(--fs-sm); color: var(--text-primary); background: var(--bg-surface); border: 1px solid var(--border-default); border-radius: var(--radius-md); min-width: 0; transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease); }
.sx-sel-b:hover:not(:disabled) { border-color: var(--text-muted); } .sx-sel-b:focus-visible { outline: 0; border-color: var(--brand); box-shadow: var(--focus-ring); } .sx-sel-b:disabled { opacity: .55; cursor: not-allowed; }
.sx-sel-b[aria-expanded="true"] { border-color: var(--brand); box-shadow: var(--focus-ring); }
.sx-sel-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sx-sel-t.is-ph { color: var(--text-muted); }
.sx-ic { width: 16px; height: 16px; flex: none; } .sx-sel-b > .sx-ic { color: var(--text-muted); transition: transform var(--dur-fast) var(--ease); } .sx-sel-b[aria-expanded="true"] > .sx-ic { transform: rotate(180deg); } .sx-date .sx-sel-b > .sx-ic { transform: none !important; }
.sx-menu { position: fixed; z-index: calc(var(--z-modal) + 10); overflow-y: auto; padding: 6px; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); animation: sx-pop .12s ease-out; }
@keyframes sx-pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.sx-menu-i { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: var(--radius-md); font-size: var(--fs-md); cursor: pointer; color: var(--text-primary); }
.sx-menu-i.is-act { background: var(--bg-surface-2); } .sx-menu-i.is-sel { color: var(--brand-subtle-text); font-weight: 600; background: var(--brand-subtle); } .sx-menu-i.is-dis { opacity: .45; cursor: not-allowed; } .sx-menu-i .sx-ic { color: var(--brand); }
.sx-cal { position: fixed; z-index: calc(var(--z-modal) + 10); width: 292px; padding: 10px; background: var(--bg-elevated); border: 1px solid var(--border-default); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); animation: sx-pop .12s ease-out; outline: 0; }
.sx-cal-h { display: flex; align-items: center; gap: 2px; margin-bottom: 8px; } .sx-cal-h b { flex: 1; text-align: center; font-size: var(--fs-md); }
.sx-cal-n { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: 0; border-radius: var(--radius-md); background: none; color: var(--text-secondary); cursor: pointer; } .sx-cal-n:hover { background: var(--bg-surface-2); } .sx-cal-n .sx-ic { width: 14px; height: 14px; margin: 0 -3px; }
.sx-cal-w, .sx-cal-g { display: grid; grid-template-columns: repeat(7, 1fr); } .sx-cal-w span { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--text-muted); padding: 4px 0; }
.sx-cal-d { height: 36px; border: 0; border-radius: 10px; background: none; font-size: var(--fs-sm); color: var(--text-primary); cursor: pointer; font-variant-numeric: tabular-nums; } .sx-cal-d:hover:not(:disabled) { background: var(--bg-surface-2); }
.sx-cal-d.is-out { color: var(--text-muted); opacity: .55; } .sx-cal-d:disabled { opacity: .25; cursor: not-allowed; } .sx-cal-d.is-today { box-shadow: inset 0 0 0 1.5px var(--brand); } .sx-cal-d.is-foc { background: var(--bg-surface-2); } .sx-cal-d.is-on { background: var(--brand); color: var(--text-on-brand); font-weight: 700; opacity: 1; }
.sx-cal-f { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border-subtle); }

/* ---------- Окна подтверждения и ввода ---------- */
.sx-mdl-back { position: fixed; inset: 0; z-index: calc(var(--z-modal) + 20); display: grid; place-items: center; padding: var(--space-5); background: var(--bg-overlay); backdrop-filter: blur(3px); opacity: 0; transition: opacity .15s; } .sx-mdl-back.is-on { opacity: 1; }
.sx-mdl { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: var(--space-5); padding: 26px; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: 22px; box-shadow: var(--shadow-lg); transform: translateY(8px) scale(.98); transition: transform .15s; } .sx-mdl-back.is-on .sx-mdl { transform: none; }
.sx-mdl-ic { width: 48px; height: 48px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--brand-subtle); color: var(--brand-subtle-text); } .sx-mdl-ic.is-bad { background: var(--sx-bad-soft); color: var(--sx-bad-ink); } .sx-mdl-ic .sx-ic { width: 24px; height: 24px; }
.sx-mdl-b { display: flex; flex-direction: column; gap: var(--space-2); } .sx-mdl-b h3 { margin: 0; font-size: 17px; } .sx-mdl-b p { margin: 0; color: var(--text-secondary); font-size: var(--fs-md); } .sx-mdl-b label { font-size: var(--fs-sm); font-weight: 600; color: var(--text-secondary); margin-top: 4px; }
.sx-hint { font-size: var(--fs-sm); color: var(--text-muted); } .sx-err { font-size: var(--fs-sm); color: var(--sx-bad-ink); } .sx-mdl-f { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
@media (max-width: 520px) { .sx-mdl { padding: 20px; } .sx-mdl-f .btn { flex: 1; } }

/* ---------- Уведомление-пилюля (SotiksKit.toast): внизу по центру, тёмная на светлой теме и светлая на тёмной ---------- */
.sx-toast { position: fixed; left: 50%; bottom: 28px; z-index: var(--z-toast); display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: var(--radius-lg); background: var(--text-primary); color: var(--bg-body); box-shadow: var(--shadow-lg); font-size: var(--fs-md); font-weight: 500; cursor: pointer; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity .25s var(--ease), transform .25s var(--ease); }
.sx-toast.is-on { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.sx-toast .sx-ic { width: 20px; height: 20px; flex: none; }
.sx-toast.is-success .sx-ic { color: #4ade80; } .sx-toast.is-info .sx-ic { color: #60a5fa; } .sx-toast.is-warning .sx-ic { color: #fbbf24; } .sx-toast.is-danger .sx-ic { color: #f87171; }
:root[data-theme="dark"] .sx-toast.is-success .sx-ic { color: #16a34a; } :root[data-theme="dark"] .sx-toast.is-info .sx-ic { color: #2563eb; } :root[data-theme="dark"] .sx-toast.is-warning .sx-ic { color: #d97706; } :root[data-theme="dark"] .sx-toast.is-danger .sx-ic { color: #dc2626; }
@media (max-width: 700px) { .sx-toast { bottom: calc(var(--bottomnav-h) + 16px + env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { .sx-toast { transition: opacity .01s; } }
