/* ============================================================
   Окупаем — шторка (бургер). Разметка — partials/drawer.hbs.
   Значения из макета «шторка и лента».
   ============================================================ */

.okp-drawer-scrim {
    position: fixed;
    inset: 0;
    background: rgba(10, 9, 7, .45);
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s ease, visibility .2s;
}

.okp-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(316px, 88vw);
    background: var(--bg);
    border-left: 1px solid var(--line);
    z-index: 201;
    display: flex;
    flex-direction: column;
    padding: 14px 22px 22px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform .22s ease;
}

body.drawer-open .okp-drawer-scrim {
    opacity: 1;
    visibility: visible;
}

body.drawer-open .okp-drawer {
    transform: translateX(0);
}

body.drawer-open {
    overflow: hidden;
}

.okp-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.okp-drawer-logo {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 24px;
    color: var(--fg);
}

.okp-drawer-label {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 22px;
}

.okp-drawer-rubrics {
    display: flex;
    flex-direction: column;
    margin-top: 6px;
}

.okp-drawer-rubrics a {
    font-family: var(--font-display);
    font-weight: 500;
    font-size: 21px;
    color: var(--fg);
    padding: 9px 0;
    border-bottom: 1px solid var(--line);
}

.okp-drawer-rubrics a:hover {
    color: var(--green);
}

.okp-drawer-about {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 15px;
    color: var(--fg);
    padding-top: 16px;
}

.okp-drawer-about:hover {
    color: var(--green);
}

.okp-drawer-social {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.okp-drawer-social a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-s);
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 13px;
    color: var(--fg);
}

.okp-drawer-social a:hover {
    border-color: var(--green);
    color: var(--green);
}

/* Тумблер темы внизу шторки */
.okp-drawer-theme {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.okp-drawer-theme-label {
    font-family: var(--font-text);
    font-weight: 600;
    font-size: 14px;
    color: var(--fg);
}

.okp-drawer-theme-label::after {
    content: "Светлая тема";
}

[data-theme="dark"] .okp-drawer-theme-label::after {
    content: "Тёмная тема";
}

.okp-switch {
    width: 56px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
    cursor: pointer;
    position: relative;
    padding: 0;
}

.okp-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--green);
    transition: left .18s ease;
    display: grid;
    place-items: center;
    color: #FBF9F5;
}

[data-theme="dark"] .okp-switch-knob {
    left: 27px;
}

.okp-switch-knob svg {
    width: 13px;
    height: 13px;
    display: block;
}

.okp-switch-knob .okp-ic-moon {
    display: none;
}

[data-theme="dark"] .okp-switch-knob .okp-ic-moon {
    display: block;
}

[data-theme="dark"] .okp-switch-knob .okp-ic-sun {
    display: none;
}
