/*
 * drawer.css — Radar Self Prototype
 * Slideover drawer component + active nav style
 */

/* --- Active nav tab --- */
.topbar__nav a.nav--active {
    color: #fff;
    border-bottom: 2px solid #fff;
    padding-bottom: 2px;
}

/* --- Nav groups (цвет через CSS-переменную --group-color) --- */
.topbar__group {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.topbar__group a {
    color: var(--group-color, #cbd5e1);
}

.topbar__group a:hover {
    color: #fff;
}

.topbar__group a.nav--active {
    color: #fff;
    border-bottom-color: var(--group-color, #fff);
}

/* --- Разделитель | между группами --- */
.topbar__sep {
    color: #374151;
    margin: 0 12px;
    font-weight: 300;
    font-size: 16px;
    user-select: none;
}

/* --- Drawer backdrop --- */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 200;
}
.drawer-backdrop[hidden] { display: none; }

/* --- Drawer panel --- */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(480px, 92vw);
    background: #fff;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12);
    z-index: 201;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    /* Slide-in animation */
    transform: translateX(0);
    transition: transform 0.2s ease;
}
.drawer[hidden] {
    display: none;
}

/* --- Drawer header --- */
.drawer__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.drawer__header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 340px;
}

/* --- Drawer body (scrollable) --- */
.drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* --- Field rows inside drawer --- */
.drawer-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.drawer-field label {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.drawer-field input[type="text"],
.drawer-field input[type="number"],
.drawer-field select,
.drawer-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    background: #fff;
    color: #111827;
}
.drawer-field input[readonly],
.drawer-field textarea[readonly] {
    background: #f9fafb;
    color: #6b7280;
    cursor: default;
}
.drawer-field textarea {
    min-height: 90px;
    resize: vertical;
    font-family: inherit;
}

/* --- Drawer footer --- */
.drawer__footer {
    display: flex;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #f9fafb;
}
