/* Drawer Styles */
.drawer {
    position: absolute;
    top: 0;
    left: 260px;
    /* Width of sidebar */
    width: 340px;
    height: 100vh;
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--border-glass);
    z-index: 1900;
    /* Below sidebar (2000) */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 12px 0 32px rgba(0, 0, 0, 0.8);
}

.drawer.hidden {
    transform: translateX(-100%);
}

.drawer-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.close-btn-drawer {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-btn-drawer:hover {
    color: white;
    background: rgba(255, 0, 60, 0.1);
    border-color: rgba(255, 0, 60, 0.3);
    transform: rotate(90deg);
}

.drawer-content {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

/* Sections inside Drawer */
.drawer-section {
    margin-bottom: 32px;
}

.drawer-section h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 16px;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Grid for Map Styles */
.style-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.style-option {
    background: rgba(10, 15, 30, 0.6);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.style-option:hover {
    background: rgba(0, 240, 255, 0.05);
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
}

.style-option.active {
    border-color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.1);
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.2), inset 0 0 10px rgba(0, 240, 255, 0.1);
}

.style-preview {
    width: 100%;
    height: 60px;
    border-radius: 8px;
    margin-bottom: 10px;
    background-size: cover;
    background-position: center;
    opacity: 0.9;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.style-label {
    font-size: 0.9rem;
    color: var(--text-main);
    font-weight: 600;
}

/* Toggles */
.toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.toggle-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #ddd;
}

/* Switch Component */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 26px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 50%;
}

input:checked+.slider {
    background-color: rgba(0, 240, 255, 0.2);
    border-color: var(--accent-primary);
    box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

input:checked+.slider:before {
    transform: translateX(22px);
    background-color: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-primary-glow);
}

/* Line List */
.line-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: background 0.2s;
}

.line-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.line-info strong {
    display: block;
    color: white;
    font-size: 1rem;
    margin-bottom: 4px;
}

.line-info span {
    color: #888;
    font-size: 0.85rem;
}

.line-actions button {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.line-actions button:hover {
    border-color: #3b82f6;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .drawer {
        /* When sidebar is 200px */
        left: 200px;
        width: 280px;
    }
}

@media (max-width: 768px) {

    /* Mobile Drawer */
    .drawer {
        left: 70px;
        /* Sidebar is 70px */
        width: calc(100vw - 70px);
    }
}