/**
 * Modern Drawer Navigation Styles
 * Sliding drawer with smooth animations
 */

/* Drawer Container */
.drawer {
    position: fixed;
    top: 0;
    left: -300px;
    width: 300px;
    height: 100%;
    background: linear-gradient(135deg, #000033 0%, #000066 100%);
    border-right: 3px solid #00FFFF;
    box-shadow: 5px 0 20px rgba(0, 255, 255, 0.3);
    z-index: 1001;
    transition: left 0.3s ease-in-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.drawer.open {
    left: 0;
}

/* Drawer Header */
.drawer-header {
    padding: 20px;
    background: linear-gradient(135deg, #000066 0%, #000099 100%);
    border-bottom: 2px solid #00FFFF;
}

.drawer-header h2 {
    margin: 0;
    color: #00FFFF;
    font-size: 1.5rem;
    text-shadow: 0 0 10px #00FFFF;
    font-family: 'Orbitron', sans-serif;
}

/* Drawer Navigation */
.drawer-nav {
    flex: 1;
    padding: 10px 0;
}

.drawer-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
}

.drawer-item:hover {
    background: rgba(0, 255, 255, 0.1);
    border-left-color: #00FFFF;
    color: #00FFFF;
}

.drawer-item.active {
    background: rgba(0, 255, 255, 0.2);
    border-left-color: #FFFF00;
    color: #FFFF00;
}

.drawer-item.active::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #FFFF00;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFFF00;
}

.drawer-icon {
    font-size: 1.3rem;
    margin-right: 15px;
    display: inline-block;
    width: 30px;
    text-align: center;
}

.drawer-divider {
    height: 1px;
    background: rgba(0, 255, 255, 0.3);
    margin: 10px 20px;
}

/* Drawer Footer */
.drawer-footer {
    padding: 20px;
    border-top: 1px solid rgba(0, 255, 255, 0.3);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

/* Overlay */
body.drawer-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

/* Content shift when drawer is open */
body.drawer-open .main-content-wrapper {
    transform: translateX(50px);
    transition: transform 0.3s ease-in-out;
}

/* View Containers */
.view-container {
    display: none;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.view-container.active {
    display: block;
}

/* Map View */
#map-view {
    position: relative;
    height: calc(100vh - 200px);
}

#weather-map {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    border: 3px solid #00FFFF;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

/* Map Controls */
.map-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 500;
    background: linear-gradient(135deg, #000033 0%, #000066 100%);
    border: 2px solid #00FFFF;
    border-radius: 8px;
    padding: 10px;
}

.map-control-btn {
    display: block;
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid #00FFFF;
    color: #00FFFF;
    padding: 8px 12px;
    margin: 5px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.8rem;
}

.map-control-btn:hover {
    background: #00FFFF;
    color: #000033;
}

/* Layer Selector */
.layer-selector {
    position: absolute;
    bottom: 20px;
    left: 20px;
    z-index: 500;
    background: linear-gradient(135deg, #000033 0%, #000066 100%);
    border: 2px solid #00FFFF;
    border-radius: 8px;
    padding: 15px;
}

.layer-selector h3 {
    margin: 0 0 10px 0;
    color: #00FFFF;
    font-size: 0.9rem;
}

.layer-option {
    display: flex;
    align-items: center;
    margin: 8px 0;
    color: #FFFFFF;
    font-size: 0.8rem;
}

.layer-option input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #00FFFF;
}

/* Detailed View */
#detailed-view {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
}

.detail-panel {
    background: linear-gradient(135deg, #000033 0%, #000066 100%);
    border: 2px solid #00FFFF;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 255, 255, 0.2);
}

.detail-panel h3 {
    margin: 0 0 15px 0;
    color: #FFFF00;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    padding-bottom: 10px;
}

/* Settings View */
#settings-view {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

.settings-section {
    background: linear-gradient(135deg, #000033 0%, #000066 100%);
    border: 2px solid #00FFFF;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section h3 {
    margin: 0 0 15px 0;
    color: #FFFF00;
    font-size: 1.1rem;
}

.setting-item {
    margin: 15px 0;
}

.setting-item label {
    display: flex;
    align-items: center;
    color: #FFFFFF;
    font-size: 0.9rem;
    cursor: pointer;
}

.setting-item input[type="radio"],
.setting-item input[type="checkbox"] {
    margin-right: 10px;
    accent-color: #00FFFF;
}

.setting-item select {
    width: 100%;
    padding: 8px;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #00FFFF;
    color: #FFFFFF;
    border-radius: 4px;
    font-family: inherit;
    margin-top: 5px;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #000033 0%, #000066 100%);
    border: 2px solid #00FFFF;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 999;
    display: none;
}

.autocomplete-item {
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
}

.autocomplete-item:hover {
    background: rgba(0, 255, 255, 0.2);
}

.autocomplete-item .location-name {
    color: #FFFFFF;
    font-size: 0.9rem;
    display: block;
}

.autocomplete-item .location-details {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
    margin-top: 2px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .drawer {
        width: 280px;
        left: -280px;
    }
    
    body.drawer-open .main-content-wrapper {
        transform: none;
    }
    
    .drawer-item {
        padding: 12px 15px;
    }
    
    .drawer-icon {
        font-size: 1.1rem;
        margin-right: 12px;
    }
    
    #detailed-view {
        grid-template-columns: 1fr;
        gap: 15px;
        padding: 15px;
    }
    
    .map-controls,
    .layer-selector {
        transform: scale(0.9);
    }
}

@media (max-width: 480px) {
    .drawer {
        width: 260px;
        left: -260px;
    }
    
    .drawer-header {
        padding: 15px;
    }
    
    .drawer-header h2 {
        font-size: 1.2rem;
    }
    
    .drawer-item {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .drawer-icon {
        font-size: 1rem;
        margin-right: 10px;
        width: 25px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .drawer {
        background: linear-gradient(135deg, #000000 0%, #111111 100%);
    }
    
    .drawer-header {
        background: linear-gradient(135deg, #111111 0%, #222222 100%);
    }
}