/*
 * РАТК · независимые виджеты темы: переключатель оформления и панель расписания.
 *
 * Этот файл подключается на ЛЮБОЙ теме (через additionalhtmlhead), потому что
 * переключатель должен быть доступен и на «Классической» (Boost), где наша
 * основная таблица стилей не загружается.
 *
 * База здесь светлая — так выглядит классическая тема. Тёмные варианты
 * включаются классом ratkga-dark на <html>.
 */

/* ---------- переключатель оформления ---------- */
.ratkga-switch {
    position: relative;
    display: inline-block;
    margin: 0 6px;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.ratkga-switch__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dde5f0;
    border-radius: 99px;
    background: #ffffff;
    color: #3e5169;
    font: inherit;
    font-size: 13px;
    font-weight: 550;
    cursor: pointer;
    transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.ratkga-switch__btn:hover {
    border-color: #1f5ce0;
    color: #0d1622;
}

.ratkga-switch__btn svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ratkga-switch__chevron {
    width: 12px !important;
    height: 12px !important;
    opacity: 0.6;
}

.ratkga-switch__menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 1200;
    min-width: 190px;
    padding: 6px;
    border: 1px solid #dde5f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 18px 40px -22px rgba(16, 38, 68, 0.55);
}

.ratkga-switch__menu[hidden] {
    display: none;
}

.ratkga-switch__item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 8px 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #3e5169;
    font: inherit;
    font-size: 13.5px;
    text-align: left;
    cursor: pointer;
}

.ratkga-switch__item:hover {
    background: #f2f5fa;
    color: #0d1622;
}

.ratkga-switch__item.is-active {
    background: rgba(31, 92, 224, 0.10);
    color: #0d1622;
    font-weight: 600;
}

.ratkga-switch__item svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.ratkga-switch__dot {
    width: 6px;
    height: 6px;
    margin-left: auto;
    border-radius: 50%;
    background: #1f5ce0;
}

html.ratkga-dark .ratkga-switch__btn {
    background: #131a23;
    border-color: #223040;
    color: #a9bacd;
}

html.ratkga-dark .ratkga-switch__btn:hover {
    border-color: #4d86ff;
    color: #ffffff;
}

html.ratkga-dark .ratkga-switch__menu {
    background: #131a23;
    border-color: #1f2a37;
    box-shadow: 0 18px 40px -22px #000000;
}

html.ratkga-dark .ratkga-switch__item {
    color: #a9bacd;
}

html.ratkga-dark .ratkga-switch__item:hover {
    background: #17202b;
    color: #eaf0f7;
}

html.ratkga-dark .ratkga-switch__item.is-active {
    background: rgba(77, 134, 255, 0.14);
    color: #ffffff;
}

html.ratkga-dark .ratkga-switch__dot {
    background: #4d86ff;
}

@media (max-width: 991px) {
    .ratkga-switch__btn span {
        display: none;
    }

    .ratkga-switch__btn {
        padding: 0 10px;
    }
}

/* ---------- панель расписания в левом меню ---------- */
.ratkga-rasp {
    margin: 14px 8px 10px;
    padding-top: 14px;
    border-top: 1px solid #dde5f0;
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

.ratkga-rasp__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.ratkga-rasp__title {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #6a7d94;
}

.ratkga-rasp__all {
    font-size: 11.5px;
    color: #1f5ce0;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
}

.ratkga-rasp__all:hover {
    color: #1648b8;
    border-bottom-color: currentColor;
}

.ratkga-rasp__select {
    width: 100%;
    margin-bottom: 10px;
    padding: 7px 10px;
    border: 1px solid #dde5f0;
    border-radius: 10px;
    background: #ffffff;
    color: #0d1622;
    font-size: 12.5px;
}

.ratkga-rasp__select:focus {
    outline: none;
    border-color: #1f5ce0;
    box-shadow: 0 0 0 3px rgba(31, 92, 224, 0.14);
}

.ratkga-rasp__nav {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
}

.ratkga-rasp__arrow {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid #dde5f0;
    border-radius: 8px;
    background: #ffffff;
    color: #3e5169;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.ratkga-rasp__arrow:hover {
    border-color: #1f5ce0;
    background: #f2f5fa;
    color: #0d1622;
}

.ratkga-rasp__date {
    flex: 1 1 auto;
    min-width: 0;
    padding: 3px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #6a7d94;
    font-size: 11.5px;
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.ratkga-rasp__date:hover {
    border-color: #dde5f0;
    color: #0d1622;
}

.ratkga-rasp__date.is-static,
.ratkga-rasp__date.is-static:hover {
    border-color: transparent;
    color: #6a7d94;
    cursor: default;
}

.ratkga-rasp__note {
    margin: 0;
    font-size: 12.5px;
    color: #6a7d94;
}

.ratkga-rasp__note--error {
    color: #c0392b;
}

.ratkga-rasp__lesson {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed #eef2f8;
}

.ratkga-rasp__lesson:last-child {
    border-bottom: 0;
}

.ratkga-rasp__num {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    background: #eef3fa;
    color: #3e5169;
    font-size: 11.5px;
    font-weight: 700;
}

.ratkga-rasp__main {
    min-width: 0;
}

.ratkga-rasp__time {
    display: block;
    font-size: 11.5px;
    color: #1f5ce0;
    font-variant-numeric: tabular-nums;
}

.ratkga-rasp__item {
    margin-top: 3px;
}

.ratkga-rasp__disc {
    display: block;
    font-size: 12.5px;
    line-height: 1.25;
    color: #0d1622;
    overflow-wrap: anywhere;
}

.ratkga-rasp__meta,
.ratkga-rasp__teacher {
    display: block;
    font-size: 11px;
    color: #6a7d94;
}

/* тёмный вариант панели */
html.ratkga-dark .ratkga-rasp {
    border-top-color: #1a2431;
}

html.ratkga-dark .ratkga-rasp__title,
html.ratkga-dark .ratkga-rasp__date,
html.ratkga-dark .ratkga-rasp__note,
html.ratkga-dark .ratkga-rasp__meta,
html.ratkga-dark .ratkga-rasp__teacher {
    color: #7c8ea3;
}

html.ratkga-dark .ratkga-rasp__date:hover {
    border-color: #223040;
    color: #eaf0f7;
}

html.ratkga-dark .ratkga-rasp__all,
html.ratkga-dark .ratkga-rasp__time {
    color: #4d86ff;
}

html.ratkga-dark .ratkga-rasp__all:hover {
    color: #7fa8ff;
}

html.ratkga-dark .ratkga-rasp__select {
    background: #131a23;
    border-color: #223040;
    color: #eaf0f7;
}

html.ratkga-dark .ratkga-rasp__arrow {
    background: #131a23;
    border-color: #223040;
    color: #a9bacd;
}

html.ratkga-dark .ratkga-rasp__arrow:hover {
    background: #17202b;
    border-color: #4d86ff;
    color: #eaf0f7;
}

html.ratkga-dark .ratkga-rasp__lesson {
    border-bottom-color: #1a2431;
}

html.ratkga-dark .ratkga-rasp__num {
    background: #17202b;
    color: #a9bacd;
}

html.ratkga-dark .ratkga-rasp__disc {
    color: #eaf0f7;
}

html.ratkga-dark .ratkga-rasp__note--error {
    color: #ff8f8f;
}

/* ==========================================================================
   МОДЕРНИЗАЦИЯ ВИДЖЕТОВ · только наши темы
   --------------------------------------------------------------------------
   Базовые правила выше — общие для всех тем, включая Классическую (Boost).
   Их не трогаем. Всё ниже адресовано строго ratkga-light / ratkga-dark,
   поэтому Классическая остаётся ровно такой, какой была.
   ========================================================================== */

/* ---------- переключатель: светлая наша ---------- */
html.ratkga-light .ratkga-switch__btn {
    background: #ffffff;
    border-color: #e5e8ee;
    color: #475569;
    border-radius: 999px;
    transition: border-color 0.14s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.14s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.14s cubic-bezier(0.4, 0, 0.2, 1);
}

html.ratkga-light .ratkga-switch__btn:hover {
    border-color: rgba(37, 99, 235, 0.45);
    background: #f6f7f9;
    color: #0f1620;
}

html.ratkga-light .ratkga-switch__btn:focus-visible,
html.ratkga-light .ratkga-switch__item:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

html.ratkga-light .ratkga-switch__menu {
    background: #ffffff;
    border-color: #e5e8ee;
    border-radius: 13px;
    padding: 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 22px 48px -26px rgba(15, 23, 42, 0.34);
}

html.ratkga-light .ratkga-switch__item {
    color: #475569;
    border-radius: 9px;
}

html.ratkga-light .ratkga-switch__item:hover {
    background: #eef1f5;
    color: #0f1620;
}

html.ratkga-light .ratkga-switch__item.is-active {
    background: rgba(37, 99, 235, 0.10);
    color: #0f1620;
    font-weight: 600;
}

html.ratkga-light .ratkga-switch__dot {
    background: #2563eb;
}

/* ---------- переключатель: тёмная наша ---------- */
html.ratkga-dark .ratkga-switch__btn {
    background: #12171f;
    border-color: rgba(255, 255, 255, 0.10);
    color: #a3b1c2;
    border-radius: 999px;
    transition: border-color 0.14s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.14s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.14s cubic-bezier(0.4, 0, 0.2, 1);
}

html.ratkga-dark .ratkga-switch__btn:hover {
    background: #171d27;
    border-color: rgba(59, 130, 246, 0.55);
    color: #ffffff;
}

html.ratkga-dark .ratkga-switch__btn:focus-visible,
html.ratkga-dark .ratkga-switch__item:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

html.ratkga-dark .ratkga-switch__menu {
    background: #12171f;
    border-color: rgba(255, 255, 255, 0.10);
    border-radius: 13px;
    padding: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.40), 0 22px 48px -22px #000000;
}

html.ratkga-dark .ratkga-switch__item {
    color: #a3b1c2;
    border-radius: 9px;
}

html.ratkga-dark .ratkga-switch__item:hover {
    background: #171d27;
    color: #e9eef6;
}

html.ratkga-dark .ratkga-switch__item.is-active {
    background: rgba(59, 130, 246, 0.14);
    color: #ffffff;
}

html.ratkga-dark .ratkga-switch__dot {
    background: #6aa1ff;
}

/* ---------- расписание: светлая наша ---------- */
html.ratkga-light .ratkga-rasp {
    border-top-color: #e5e8ee;
}

html.ratkga-light .ratkga-rasp__title {
    color: #8b95a4;
}

html.ratkga-light .ratkga-rasp__all {
    color: #2563eb;
}

html.ratkga-light .ratkga-rasp__all:hover {
    color: #1d4ed8;
}

html.ratkga-light .ratkga-rasp__select {
    background: #ffffff;
    border-color: #d3d9e3;
    border-radius: 11px;
    color: #0f1620;
}

html.ratkga-light .ratkga-rasp__select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
    outline: none;
}

html.ratkga-light .ratkga-rasp__arrow {
    background: #ffffff;
    border-color: #d3d9e3;
    border-radius: 9px;
    color: #475569;
    transition: background-color 0.14s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.14s cubic-bezier(0.4, 0, 0.2, 1);
}

html.ratkga-light .ratkga-rasp__arrow:hover {
    background: #eef1f5;
    border-color: rgba(37, 99, 235, 0.45);
    color: #0f1620;
}

html.ratkga-light .ratkga-rasp__date {
    color: #7c8798;
}

html.ratkga-light .ratkga-rasp__date:hover {
    border-color: #e5e8ee;
    color: #0f1620;
}

html.ratkga-light .ratkga-rasp__note,
html.ratkga-light .ratkga-rasp__meta,
html.ratkga-light .ratkga-rasp__teacher {
    color: #7c8798;
}

html.ratkga-light .ratkga-rasp__lesson {
    border-bottom-color: #f0f2f6;
}

html.ratkga-light .ratkga-rasp__num {
    background: #eef1f5;
    color: #475569;
    border-radius: 8px;
}

html.ratkga-light .ratkga-rasp__time {
    color: #2563eb;
}

html.ratkga-light .ratkga-rasp__disc {
    color: #0f1620;
}

html.ratkga-light .ratkga-rasp__note--error {
    color: #b91c1c;
}

/* ---------- расписание: тёмная наша ---------- */
html.ratkga-dark .ratkga-rasp {
    border-top-color: rgba(255, 255, 255, 0.075);
}

html.ratkga-dark .ratkga-rasp__title {
    color: #6b7a90;
}

html.ratkga-dark .ratkga-rasp__all,
html.ratkga-dark .ratkga-rasp__time {
    color: #6aa1ff;
}

html.ratkga-dark .ratkga-rasp__all:hover {
    color: #9dc2ff;
}

html.ratkga-dark .ratkga-rasp__select {
    background: #0d1219;
    border-color: rgba(255, 255, 255, 0.10);
    border-radius: 11px;
    color: #e9eef6;
}

html.ratkga-dark .ratkga-rasp__select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
    outline: none;
}

html.ratkga-dark .ratkga-rasp__arrow {
    background: #12171f;
    border-color: rgba(255, 255, 255, 0.10);
    border-radius: 9px;
    color: #a3b1c2;
    transition: background-color 0.14s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.14s cubic-bezier(0.4, 0, 0.2, 1);
}

html.ratkga-dark .ratkga-rasp__arrow:hover {
    background: #171d27;
    border-color: rgba(59, 130, 246, 0.55);
    color: #ffffff;
}

html.ratkga-dark .ratkga-rasp__date {
    color: #74839a;
}

html.ratkga-dark .ratkga-rasp__date:hover {
    border-color: rgba(255, 255, 255, 0.12);
    color: #e9eef6;
}

html.ratkga-dark .ratkga-rasp__note,
html.ratkga-dark .ratkga-rasp__meta,
html.ratkga-dark .ratkga-rasp__teacher {
    color: #74839a;
}

html.ratkga-dark .ratkga-rasp__lesson {
    border-bottom-color: rgba(255, 255, 255, 0.055);
}

html.ratkga-dark .ratkga-rasp__num {
    background: #171d27;
    color: #a3b1c2;
    border-radius: 8px;
}

html.ratkga-dark .ratkga-rasp__disc {
    color: #e9eef6;
}

html.ratkga-dark .ratkga-rasp__note--error {
    color: #fca5a5;
}

/* ==========================================================================
   СТУДЕНЧЕСКИЙ СЛОЙ · элементы, которые строит js/student.js
   --------------------------------------------------------------------------
   Скрипт монтируется только на нашей теме (проверяет styles.php/ratkga),
   поэтому на Классической этих узлов не существует вообще. Правила ниже
   всё равно разведены по ratkga-light / ratkga-dark — чтобы палитра
   не зависела от порядка применения классов.
   ========================================================================== */

/* ---------- приветствие и сводка ---------- */
.ratkga-hello {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 18px;
    padding: 18px 22px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 18px;
    background:
        radial-gradient(80% 140% at 6% 0%, rgba(59, 130, 246, 0.20), transparent 64%),
        #12171f;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.28), 0 14px 34px -30px #000000;
}

.ratkga-hello__head {
    min-width: 0;
}

.ratkga-hello__name {
    margin: 0 0 4px;
    font-size: clamp(18px, 1.9vw, 23px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: #e9eef6;
}

.ratkga-hello__sub {
    margin: 0;
    font-size: 13px;
    color: #8794a8;
}

.ratkga-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ratkga-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 78px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.03);
}

.ratkga-stat__n {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.1;
    color: #e9eef6;
    font-variant-numeric: tabular-nums;
}

.ratkga-stat__l {
    margin-top: 2px;
    font-size: 11px;
    color: #8794a8;
    white-space: nowrap;
}

.ratkga-stat--accent {
    border-color: rgba(59, 130, 246, 0.45);
    background: rgba(59, 130, 246, 0.12);
}

.ratkga-stat--accent .ratkga-stat__n {
    color: #9dc2ff;
}

/* ---------- фильтр курсов ---------- */
.ratkga-filter {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
}

.ratkga-filter__input {
    width: 100%;
    min-height: 40px;
    padding: 8px 14px 8px 38px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 11px;
    background: #0d1219;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238794a8' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
    background-size: 17px 17px;
    color: #e9eef6;
    font-size: 14px;
    transition: border-color 0.14s cubic-bezier(0.4, 0, 0.2, 1);
}

.ratkga-filter__input::placeholder {
    color: #66748a;
}

.ratkga-filter__input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.ratkga-filter__info {
    position: absolute;
    right: 12px;
    font-size: 12px;
    color: #8794a8;
    pointer-events: none;
}

/* ---------- метки сроков ---------- */
.ratkga-has-due {
    position: relative;
}

.ratkga-due {
    display: inline-block;
    margin-left: 8px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.ratkga-due--late {
    background: rgba(239, 68, 68, 0.20);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.40);
}

.ratkga-due--today {
    background: rgba(245, 158, 11, 0.20);
    color: #fbc76a;
    border: 1px solid rgba(245, 158, 11, 0.40);
}

.ratkga-due--soon {
    background: rgba(59, 130, 246, 0.18);
    color: #9dc2ff;
    border: 1px solid rgba(59, 130, 246, 0.36);
}

.ratkga-due--week {
    background: rgba(255, 255, 255, 0.05);
    color: #8794a8;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

/* ---------- светлая палитра ---------- */
html.ratkga-light .ratkga-hello {
    border-color: #e5e8ee;
    background:
        radial-gradient(80% 140% at 6% 0%, rgba(37, 99, 235, 0.09), transparent 64%),
        #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 34px -32px rgba(15, 23, 42, 0.30);
}

html.ratkga-light .ratkga-hello__name {
    color: #0f1620;
}

html.ratkga-light .ratkga-hello__sub {
    color: #6b7686;
}

html.ratkga-light .ratkga-stat {
    border-color: #e5e8ee;
    background: #f6f7f9;
}

html.ratkga-light .ratkga-stat__n {
    color: #0f1620;
}

html.ratkga-light .ratkga-stat__l {
    color: #6b7686;
}

html.ratkga-light .ratkga-stat--accent {
    border-color: rgba(37, 99, 235, 0.35);
    background: rgba(37, 99, 235, 0.07);
}

html.ratkga-light .ratkga-stat--accent .ratkga-stat__n {
    color: #1d4ed8;
}

html.ratkga-light .ratkga-filter__input {
    background-color: #ffffff;
    border-color: #d3d9e3;
    color: #0f1620;
}

html.ratkga-light .ratkga-filter__input::placeholder {
    color: #9aa4b2;
}

html.ratkga-light .ratkga-filter__input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

html.ratkga-light .ratkga-filter__info {
    color: #6b7686;
}

html.ratkga-light .ratkga-due--late {
    background: rgba(220, 38, 38, 0.10);
    color: #b91c1c;
    border-color: rgba(220, 38, 38, 0.30);
}

html.ratkga-light .ratkga-due--today {
    background: rgba(217, 119, 6, 0.12);
    color: #b45309;
    border-color: rgba(217, 119, 6, 0.30);
}

html.ratkga-light .ratkga-due--soon {
    background: rgba(37, 99, 235, 0.10);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.28);
}

html.ratkga-light .ratkga-due--week {
    background: #eef1f5;
    color: #6b7686;
    border-color: #e5e8ee;
}

/* на узком экране сводка разворачивается в столбец */
@media (max-width: 767px) {
    .ratkga-hello {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 18px;
    }

    .ratkga-stats {
        width: 100%;
    }

    .ratkga-stat {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* ---------- кликабельная строка события ---------- */
.ratkga-clickable {
    position: relative;
    cursor: pointer;
    padding-right: 34px !important;
    border-radius: 11px;
    transition: background-color 0.14s cubic-bezier(0.4, 0, 0.2, 1);
}

.ratkga-clickable:hover {
    background: #171d27;
}

.ratkga-clickable:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: -2px;
}

.ratkga-clickable__arrow {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    font-size: 20px;
    line-height: 1;
    color: #5d6b80;
    opacity: 0;
    transition: opacity 0.14s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.14s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.ratkga-clickable:hover .ratkga-clickable__arrow,
.ratkga-clickable:focus-visible .ratkga-clickable__arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(2px);
    color: #6aa1ff;
}

/* светлая палитра */
html.ratkga-light .ratkga-clickable:hover {
    background: #eef1f5;
}

html.ratkga-light .ratkga-clickable:focus-visible {
    outline-color: #2563eb;
}

html.ratkga-light .ratkga-clickable__arrow {
    color: #a8b1bd;
}

html.ratkga-light .ratkga-clickable:hover .ratkga-clickable__arrow,
html.ratkga-light .ratkga-clickable:focus-visible .ratkga-clickable__arrow {
    color: #2563eb;
}

@media (prefers-reduced-motion: reduce) {
    .ratkga-clickable,
    .ratkga-clickable__arrow {
        transition: none;
    }
}
