/**
 * State Selector Styles for ADV Plotter Australia
 */

/* ============================================================================
   State Selector Control - Match Leaflet layers control styling
   ============================================================================ */
.state-control {
    margin-bottom: 10px !important;
}

.state-control .state-toggle-btn {
    display: block;
    width: 36px;
    height: 36px;
    background-color: var(--panel, #141a1c);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
    font-size: 18px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 36px;
    text-align: center;
    text-decoration: none;
    color: var(--text, #e5e7eb);
}

.state-control .state-toggle-btn:hover {
    background-color: rgba(212, 165, 32, 0.3);
}

.state-control .state-toggle-btn.active {
    background-color: rgba(212, 165, 32, 0.5);
}

/* ============================================================================
   State Selector Sidebar
   ============================================================================ */
.state-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.15);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.state-sidebar.open {
    right: 0;
}

.state-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, #d4a520 0%, #a67c00 100%);
    color: #fff;
}

.state-sidebar-title {
    font-size: 18px;
    font-weight: 600;
}

.state-sidebar-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.state-sidebar-close:hover {
    background: rgba(255,255,255,0.1);
}

.state-sidebar-notice {
    padding: 12px 20px;
    background: #fff8e1;
    border-bottom: 1px solid #e9ecef;
    color: #333;
}

.state-sidebar-notice small {
    color: #333;
    font-size: 13px;
}

.state-sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 0;
}

.state-sidebar-footer {
    padding: 12px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    text-align: center;
    color: #6c757d;
}

/* ============================================================================
   State Selector Items
   ============================================================================ */
.state-item {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.state-item:hover {
    background: #f8f9fa;
}

.state-item.selected {
    background: rgba(212, 165, 32, 0.1);
    border-left: 4px solid #d4a520;
    padding-left: 16px;
}

.state-item .state-abbr {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    margin-right: 14px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #d4a520 0%, #a67c00 100%);
    color: #fff;
}

.state-item .state-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.state-item .state-check {
    color: #d4a520;
    font-size: 20px;
    font-weight: bold;
    display: none;
}

.state-item.selected .state-check {
    display: block;
}

/* All Australia option */
.state-item.all-australia {
    background: #f5f5f5;
}

.state-item.all-australia .state-abbr {
    background: linear-gradient(135deg, #333 0%, #111 100%);
}

/* Current state indicator on map */
.current-state-indicator {
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(20, 26, 28, 0.9);
    color: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    pointer-events: none;
}

.current-state-indicator .state-label {
    color: #d4a520;
    font-weight: 700;
}

/* Brand region styling */
.brand-region {
    color: #d4a520;
    font-weight: 600;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .state-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .current-state-indicator {
        font-size: 12px;
        padding: 6px 12px;
    }
}
