/* styles/overlays.css — drawer, модальные окна, backdrop, переключатели */

.drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: var(--drawer-width);
    background: var(--panel);
    border-right: 1px solid var(--border);
    box-shadow: 8px 0 24px rgba(0, 0, 0, .25);
    z-index: 30;
    transform: translateX(-100%);
    transition: transform .25s ease;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

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

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

.drawer-header h2 {
    margin-bottom: 0;
}

.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 25;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text);
}

.switch-row input {
    display: none;
}

.switch {
    width: 38px;
    height: 20px;
    flex-shrink: 0;
    background: var(--border);
    border-radius: 10px;
    position: relative;
    transition: .2s;
}

.switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--text);
    transition: .2s;
}

.switch-row input:checked+.switch {
    background: var(--accent);
}

.switch-row input:checked+.switch::after {
    left: 20px;
    background: #fff;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.modal-backdrop.hidden {
    display: none !important;
}

.modal {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 48px rgba(0, 0, 0, .4);
    width: 100%;
    max-width: 560px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    margin-bottom: 0;
}

.modal-body {
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
    color: var(--dim);
    line-height: 1.6;
}

.modal-body b {
    color: var(--muted);
}