/* Map-specific styles for MLAT Sync Map */
.map-header {
    background: linear-gradient(135deg, #6b0d0d 0%, #a41717 100%);
    color: white;
    border-bottom: 3px solid #a41717;
}

.map-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
}

.map-subtitle {
    font-size: 1rem;
    color: #cccccc;
}

.map-app-container {
    display: flex;
    height: calc(100vh - 140px); /* Adjust based on navbar + header height */
    position: relative;
}

.map-sidebar {
    width: 350px;
    min-width: 350px;
    background-color: #2b2c2c;
    color: white;
    padding: 20px;
    overflow-y: auto;
    border-right: 2px solid #a41717;
}

.map-main {
    flex: 1;
    position: relative;
}

.sidebar-header h2 {
    font-size: 1.4rem;
    color: #a41717;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.mode-switch-container {
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(164, 23, 23, 0.3);
}

.mode-switch-container .form-check-input:checked {
    background-color: #a41717;
    border-color: #a41717;
}

.mode-switch-container .form-check-input:focus {
    border-color: #a41717;
    box-shadow: 0 0 0 0.25rem rgba(164, 23, 23, 0.25);
}

.mode-switch-container .form-check-label {
    color: white;
    font-weight: 500;
}

.mode-switch-container .text-muted {
    color: #cccccc !important;
    font-size: 0.85rem;
}

.info-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border-left: 4px solid #a41717;
}

.search-section {
    margin-bottom: 20px;
}

.search-section input[type="text"]:disabled {
    background-color: rgba(128, 128, 128, 0.1) !important;
    border-color: rgba(128, 128, 128, 0.3) !important;
    color: #888 !important;
    cursor: not-allowed !important;
}

.station-details {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
}

.detail-row {
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Mobile responsive adjustments */
@media screen and (max-width: 768px) {
    .map-app-container {
        flex-direction: column;
        height: calc(100vh - 120px);
    }
    
    .map-sidebar {
        width: 100%;
        min-width: auto;
        height: 200px;
        max-height: 200px;
        border-right: none;
        border-bottom: 2px solid #a41717;
    }
    
    .map-main {
        flex: 1;
        min-height: 300px;
    }
    
    .info-section {
        display: none; /* Hide detailed info on mobile to save space */
    }
    
    .map-title {
        font-size: 1.4rem;
    }
}

#progressbar {
    margin-bottom: 15px;
}

.progresslabel {
    font-size: 14px;
    color: #a41717;
    font-weight: 600;
}

/* Legacy media queries - can be removed as layout is now handled by flexbox */

#map-canvas {
    height: 100%;
    width: 100%;
    margin: 0px;
    background: black;
}

#map-container {
    height: 100%;
    width: 100%;
}

.hidden {
    display: none;
}

#stations-container {
    height: 200px;
    overflow-y: auto;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

#stations {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

#stations li a {
    border: 1px solid #555;
    margin-bottom: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: white;
    display: block;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

#stations li a:hover:not(.header) {
    background-color: rgba(164, 23, 23, 0.3);
}

.note {
    font-style: italic;
    font-size: 0.9rem;
    color: #cccccc;
    margin-bottom: 15px;
}

.error {
    color: #ff6b6b;
}

.si-label {
    font-weight: bold;
    color: #a41717;
}

/* Modern Map Element Styling */
.modern-station-marker {
    filter: drop-shadow(0 0 4px rgba(164, 23, 23, 0.6));
    transition: filter 0.2s ease;
}

.modern-station-marker:hover {
    filter: drop-shadow(0 0 8px rgba(164, 23, 23, 0.9));
}

.modern-peer-line {
    filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.5));
}

.modern-ephemeral-line {
    filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.4));
    animation: pulse-line 3s ease-in-out infinite;
}

.modern-tooltip {
    background: rgba(45, 45, 45, 0.95) !important;
    color: #ffffff !important;
    border: 2px solid #a41717 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    font-weight: 600 !important;
    padding: 8px 12px !important;
    backdrop-filter: blur(10px) !important;
}

.modern-tooltip:before {
    border-top-color: #a41717 !important;
}

@keyframes pulse-line {
    0%, 100% { 
        opacity: 0.6;
    }
    50% { 
        opacity: 0.9;
    }
}

/* Enhanced Leaflet Popup Styling */
.leaflet-popup-content-wrapper {
    background: linear-gradient(145deg, rgba(45, 45, 45, 0.95) 0%, rgba(26, 26, 26, 0.95) 100%) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
    border: 2px solid #a41717 !important;
    backdrop-filter: blur(15px) !important;
}

.leaflet-popup-content {
    color: #ffffff !important;
    font-weight: 600 !important;
    text-align: center !important;
}

.leaflet-popup-tip {
    background: #a41717 !important;
    box-shadow: 0 2px 10px rgba(164, 23, 23, 0.5) !important;
}

/* Mode-specific marker styling */
.mlat-marker {
    filter: drop-shadow(0 0 6px rgba(46, 213, 115, 0.6));
}

.adsb-marker {
    filter: drop-shadow(0 0 6px rgba(55, 66, 250, 0.6));
    /* Remove hover effects for ADS-B markers since they're not interactive */
    pointer-events: none;
}

.mlat-marker:hover {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

/* Legend for simple mode */
.mode-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(45, 45, 45, 0.95);
    color: white;
    padding: 10px;
    border-radius: 8px;
    border: 2px solid #a41717;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid white;
}

.legend-mlat {
    background-color: #2ed573;
}

.legend-adsb {
    background-color: #3742fa;
}
