/* «Данные и хранилище». Цвета берутся из текущей темы (currentColor),
   поэтому экран подстраивается под любую тему. */
.storage-window { max-height: 92vh; overflow-y: auto; scrollbar-width: none; }
.storage-window::-webkit-scrollbar { display: none; }

.st-donut { position: relative; width: 210px; height: 210px; margin: 14px auto 10px; animation: st-in .5s both; }
.st-donut svg { width: 210px; height: 210px; display: block; }
.st-seg { transition: stroke-dasharray .8s cubic-bezier(.3,.9,.3,1), stroke-dashoffset .8s cubic-bezier(.3,.9,.3,1), opacity .25s, stroke-width .25s; }
.st-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; padding: 0 44px; }
.st-total { font-size: 26px; font-weight: 600; line-height: 1.1; }
.st-sub { font-size: 12px; opacity: .65; margin-top: 3px; line-height: 1.2; }

.st-card { background: color-mix(in srgb, currentColor 7%, transparent); border-radius: 14px; padding: 2px 14px; margin: 6px 0; }
.st-card.st-pad { padding: 12px 14px; }
.st-lbl { display: block; font-size: 12px; opacity: .6; letter-spacing: .05em; margin: 4px 4px 2px; }
.st-line { font-size: 14px; }

.st-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent); cursor: pointer; }
.st-row:first-child { border-top: none; }
.st-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none; transition: transform .2s; }
.st-ic svg { width: 19px; height: 19px; }
.st-row:hover .st-ic { transform: scale(1.1); }
.st-name { flex: 1; font-size: 15px; }
.st-size { font-size: 13px; opacity: .65; min-width: 58px; text-align: right; }
.st-chk { width: 22px; height: 22px; border-radius: 50%; border: 1.6px solid color-mix(in srgb, currentColor 35%, transparent); display: flex; align-items: center; justify-content: center; color: transparent; transition: all .2s; flex: none; }
.st-chk svg { width: 13px; height: 13px; }
.st-chk.on { background: #378ADD; border-color: #378ADD; color: #fff; transform: scale(1.06); }

.st-clear { width: 100%; padding: 13px; margin: 8px 0; border: none; border-radius: 12px; background: rgba(226, 75, 74, .16); color: #e5544f; font-size: 15px; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: transform .15s, background .3s, color .3s; }
.st-clear:active { transform: scale(.98); }
.st-clear.busy::before { content: ""; width: 15px; height: 15px; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: st-spin .7s linear infinite; }
.st-clear.done { background: rgba(59, 160, 90, .18); color: #3fae66; }

/* Выбор срока автоочистки: отдельные «таблетки», выбранная — белая */
.st-seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.st-seg button { border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); padding: 11px 0; font-size: 13px; border-radius: 999px; cursor: pointer; color: inherit; opacity: 1; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.st-seg button:hover { background: rgba(255, 255, 255, .13); }
.st-seg button:active { transform: scale(.96); }
.st-seg button.on { background: #fff; color: #111; border-color: #fff; font-weight: 600; }
.st-pad-bg { display: none; }

.st-bubble { font-size: 15px; font-weight: 600; text-align: center; margin-bottom: 6px; }

/* Ползунок лимита: белая линия до бегунка, белый бегунок */
.storage-window input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; margin: 0; cursor: pointer; --p: 33%; }
.storage-window input[type=range]:focus { outline: none; }
.storage-window input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, #fff var(--p), rgba(255, 255, 255, .2) var(--p)); }
.storage-window input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .2); }
.storage-window input[type=range]::-moz-range-progress { height: 6px; border-radius: 3px; background: #fff; }
.storage-window input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); transition: transform .15s; }
.storage-window input[type=range]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: none; box-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.storage-window input[type=range]:active::-webkit-slider-thumb { transform: scale(1.15); }
.st-ticks { display: flex; justify-content: space-between; font-size: 12px; margin-top: 2px; }
.st-ticks span { opacity: .5; transition: opacity .2s; }
.st-ticks span.on { opacity: 1; font-weight: 600; }

.st-toast { position: sticky; bottom: 4px; margin: 12px auto 0; width: max-content; max-width: 100%; background: rgba(20, 20, 20, .92); color: #fff; padding: 9px 16px; border-radius: 20px; font-size: 13px; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s; pointer-events: none; }
.st-toast.show { opacity: 1; transform: none; }

@keyframes st-in { from { opacity: 0; transform: scale(.92); } to { opacity: 1; transform: none; } }
@keyframes st-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
    .st-seg, .st-donut, .st-chk, .st-ic, .st-pad-bg, .st-toast { transition: none; animation: none; }
}

/* Блок «Слабый интернет» */
.st-weak { padding: 4px 14px; }
.st-weak-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid color-mix(in srgb, currentColor 10%, transparent); }
.st-weak-row:first-child { border-top: none; }
.st-weak-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.st-weak-name { font-size: 15px; }
.st-weak-hint { font-size: 12px; opacity: .6; line-height: 1.35; }
.st-weak-row .switch { flex: none; }

/* Плашка о состоянии связи */
#shizNetBanner { position: fixed; top: 10px; left: 50%; transform: translate(-50%, -140%); z-index: 100000; max-width: calc(100vw - 24px); padding: 9px 16px; border-radius: 20px; background: rgba(28, 28, 28, .94); color: #fff; font-size: 13px; text-align: center; box-shadow: 0 4px 18px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .14); transition: transform .35s cubic-bezier(.3, 1.2, .5, 1); pointer-events: none; }
#shizNetBanner.show { transform: translate(-50%, 0); }
