/* Common Operating Picture - Modern CSS */

/* CSS Variables for consistent theming */
:root {
    --primary-color: #0078d4;
    --primary-dark: #005a9e;
    --secondary-color: #1a1a1a;
    --accent-color: #00d4ff;
    --success-color: #107c10;
    --warning-color: #ff8c00;
    --error-color: #d13438;
    
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2d2d2d;
    --bg-glass: rgba(26, 26, 26, 0.85);
    
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --text-muted: #808080;
    
    --border-color: #404040;
    --border-accent: #0078d4;
    
    --shadow-small: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-large: 0 8px 32px rgba(0, 0, 0, 0.5);
    
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --border-radius: 8px;
    --border-radius-small: 4px;
    --border-radius-large: 12px;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, 'Helvetica Neue', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
}

/* Initial app state */
.app-container {
    width: 100%;
    height: 100vh;
    display: none; /* Hidden initially, shown by JavaScript */
    grid-template-rows: 60px 1fr;
    grid-template-columns: 400px 1fr;
    grid-template-areas: 
        "header header"
        "sidebar map";
    transition: grid-template-columns var(--transition-medium);
}

.app-container.loaded {
    display: grid;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity var(--transition-slow);
}

.loading-content {
    text-align: center;
    max-width: 400px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-content p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.loading-steps {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.step {
    padding: 0.5rem 0;
    color: var(--text-muted);
    transition: color var(--transition-fast);
}

.step.active {
    color: var(--accent-color);
}

.step.completed {
    color: var(--success-color);
}

/* Layers Loading Indicator */
.layers-loading-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.layers-loading-indicator .loading-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0;
}

.layers-loading-indicator span {
    font-size: 0.9rem;
}

/* Main App Container */
.app-container {
    width: 100%;
    height: 100vh;
    display: grid;
    grid-template-rows: 60px 1fr;
    grid-template-columns: 400px 1fr;
    grid-template-areas: 
        "header header"
        "sidebar map";
    transition: grid-template-columns var(--transition-medium);
}

.app-container.sidebar-collapsed {
    grid-template-columns: 60px 1fr;
}

/* Header Bar */
.header-bar {
    grid-area: header;
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 1000;
}

.header-left .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.header-left .logo i {
    color: var(--accent-color);
    font-size: 1.5rem;
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.status-indicators {
    display: flex;
    gap: 2rem;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
}

.status-item i {
    color: var(--accent-color);
}

.header-right {
    display: flex;
    gap: 0.5rem;
}

.header-btn {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.header-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Side Panel */
.side-panel {
    grid-area: sidebar;
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-medium);
    z-index: 900;
}

.side-panel.collapsed {
    transform: translateX(-340px);
}

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

.panel-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.toggle-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.toggle-btn:hover {
    background: var(--primary-color);
}

.panel-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
}

/* Panel Navigation */
.panel-nav {
    display: flex;
    align-items: center;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem;
    gap: 0.5rem;
}

.panel-nav-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.panel-nav-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.panel-nav-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.panel-nav-btn i {
    font-size: 1rem;
}

.panel-nav-btn span {
    font-weight: 500;
}

/* Data Input Section */
.data-input-section {
    margin-bottom: 2rem;
}

.data-input-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.data-input {
    flex: 1;
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.data-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.data-input::placeholder {
    color: var(--text-muted);
}

.load-btn {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast);
}

.load-btn:hover {
    background: var(--primary-dark);
}

.load-btn:disabled {
    background: var(--border-color);
    cursor: not-allowed;
}

.format-hints {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Layers Section */
.layers-section {
    margin-bottom: 2rem;
}

.layers-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

/* Layers list - no separate scrolling, integrates with sidebar */

.layer-item {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
}

.layer-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-small);
}

.layer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.layer-name {
    font-weight: 600;
    color: var(--text-primary);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.layer-controls {
    display: flex;
    gap: 0.25rem;
}

.layer-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
}

.layer-btn:hover {
    background: var(--primary-color);
    color: white;
}

.layer-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.layer-description {
    font-style: italic;
    color: var(--accent-color) !important;
    margin: 0.5rem 0;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius-small);
    border-left: 3px solid var(--accent-color);
    font-size: 0.8rem;
    line-height: 1.3;
}

/* Actions Section */
.actions-section h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.75rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-fast);
    font-size: 0.9rem;
}

.action-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* Real-time action buttons */
.realtime-btn {
    position: relative;
}

.realtime-btn.active {
    background: var(--success-color);
    border-color: var(--success-color);
}

.realtime-btn.active::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
    100% { opacity: 1; transform: scale(1); }
}

/* Real-time Loading Indicator */
.realtime-status {
    padding: 0.5rem 0;
}

.loading-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.loading-indicator.hidden {
    display: none;
}

.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.realtime-summary {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.realtime-summary p {
    margin: 0.25rem 0;
}

/* Map Container */
.map-container {
    grid-area: map;
    position: relative;
    overflow: hidden;
}

.map {
    width: 100%;
    height: 100%;
}

.map-info-overlay {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 1rem;
    z-index: 500;
}

.zoom-level {
    background: var(--bg-glass);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.zoom-level i {
    color: var(--accent-color);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    display: none;
    align-items: center;
    gap: 0.5rem;
    max-width: 400px;
    z-index: 2000;
    animation: slideInRight var(--transition-medium);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.error-toast {
    background: var(--error-color);
    border: 1px solid #ff6b6f;
}

.success-toast {
    background: var(--success-color);
    border: 1px solid #51cf66;
}

.toast-close {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: auto;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Feature Information Panel */
.info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.info-header h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.close-info-btn {
    width: 32px;
    height: 32px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-info-btn:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.info-content {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.no-selection {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.no-selection i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--text-muted);
}

.no-selection p {
    margin: 0;
    font-size: 1rem;
}

/* Feature Details */
.feature-details {
    animation: fadeIn var(--transition-medium);
}

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

.feature-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.feature-title i {
    color: var(--accent-color);
    font-size: 1.2rem;
}

.feature-title h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.feature-section {
    margin-bottom: 1.5rem;
}

.feature-section h6 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.75rem 0;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 600;
}

.feature-section h6 i {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.property-grid {
    display: grid;
    gap: 0.5rem;
}

.property-item {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius-small);
    font-size: 0.85rem;
}

.property-key {
    color: var(--text-secondary);
    font-weight: 500;
    word-break: break-word;
}

.property-value {
    color: var(--text-primary);
    word-break: break-all;
}

.coordinate-display {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    font-family: 'Courier New', monospace;
}

.coordinate-pair {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
}

.coordinate-label {
    color: var(--text-secondary);
}

.coordinate-value {
    color: var(--accent-color);
    font-weight: 600;
}

/* Floating Action Button */
.floating-actions {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: none;
    z-index: 1500;
}

.fab-btn {
    width: 56px;
    height: 56px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow-large);
    transition: all var(--transition-fast);
}

.fab-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.fab-btn:active {
    transform: scale(0.95);
}

/* Emergency Vehicle Popup Styles */
.vehicle-popup {
    background: var(--bg-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    min-width: 250px;    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
}

.vehicle-popup h4 {
    margin-bottom: 0.75rem;
    color: var(--accent-color);
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.vehicle-popup p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    line-height: 1.4;
}

.vehicle-popup p:last-child {
    margin-bottom: 0;
}

.vehicle-popup strong {
    color: var(--text-primary);
    font-weight: 600;
}

.vehicle-popup small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Emergency Vehicle Specific Styles */
.emergency-vehicle {
    border-left: 4px solid var(--error-color);
}

.emergency-vehicle h4 {
    color: var(--error-color);
    font-size: 1.2rem;
}

/* Status and Priority Styling */
.vehicle-popup .status-critical {
    color: var(--error-color) !important;
    font-weight: bold;
    text-transform: uppercase;
}

.vehicle-popup .status-available {
    color: var(--success-color) !important;
    font-weight: bold;
}

.vehicle-popup .priority-high {
    color: #fd7e14 !important;
    font-weight: bold;
}

.vehicle-popup .priority-critical {
    color: var(--error-color) !important;
    font-weight: bold;
    text-transform: uppercase;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Emergency Vehicle Status Animations */
.vehicle-responding {
    animation: emergency-pulse 1s infinite;
}

.vehicle-proceeding {
    animation: emergency-blink 2s infinite;
}

@keyframes emergency-pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.1);
    }
}

@keyframes emergency-blink {
    0%, 90% { opacity: 1; }
    95% { opacity: 0.3; }
}

/* Emergency Vehicle Service Type Colors */
.service-fire {
    color: #dc3545 !important;
    font-weight: bold;
}

.service-ambulance {
    color: #28a745 !important;
    font-weight: bold;
}

.service-rescue {
    color: #007bff !important;
    font-weight: bold;
}

/* Enhanced Status Colors for Emergency Services */
.status-responding {
    color: #ff0000 !important;
    font-weight: bold;
    text-transform: uppercase;
    text-shadow: 0 0 3px rgba(255, 0, 0, 0.5);
}

.status-proceeding {
    color: #ffa500 !important;
    font-weight: bold;
}

.status-on-scene {
    color: #808080 !important;
    font-weight: bold;
}

/* Emergency Services Layer Card - Integrated Dark Theme */
.emergency-services-layer {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    transition: all var(--transition-fast);
}

.emergency-services-layer:hover {
    border-color: var(--accent-color);
    box-shadow: var(--shadow-small);
}

.emergency-services-layer .layer-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 1rem;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: 0;
}

.emergency-services-layer .layer-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.emergency-services-layer .layer-icon {
    font-size: 1.5rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.emergency-services-layer .layer-details h4 {
    color: white;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.emergency-services-layer .layer-meta {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    font-size: 0.85rem;
}

.emergency-services-layer .layer-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.emergency-services-layer .layer-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-small);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.emergency-services-layer .status-indicator {
    font-size: 0.9rem;
}

.emergency-services-layer .layer-count {
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
}

.emergency-services-layer .layer-toggle-btn,
.emergency-services-layer .layer-remove-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.emergency-services-layer .layer-toggle-btn:hover,
.emergency-services-layer .layer-remove-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent-color);
    transform: scale(1.05);
}

.emergency-services-layer .layer-toggle-btn.active {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.emergency-services-layer .layer-remove-btn:hover {
    background: var(--error-color);
    border-color: var(--error-color);
}

.layer-details-section {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.emergency-services-list {
    /* Remove separate scrolling area */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-small);
    background: var(--bg-tertiary);
}

.emergency-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    transition: all var(--transition-fast);    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.emergency-service-item:hover {
    background: var(--bg-secondary);
    border-color: var(--primary-color);
}

/* Hidden state for emergency service items */
.emergency-service-item.service-hidden {
    opacity: 0.5;
    background: var(--bg-secondary);
}

.emergency-service-item.service-hidden .service-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.emergency-service-item.service-hidden .vehicle-count {
    background: var(--text-muted);
    color: var(--text-secondary);
}

.emergency-service-item:last-child {
    border-bottom: none;
}

.service-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
}

.service-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.service-status {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-small);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    width: fit-content;
}

.service-status.loading {
    background: var(--warning-color);
    color: white;
}

.service-status.active {
    background: var(--success-color);
    color: white;
}

.service-status.error {
    background: var(--error-color);
    color: white;
}

.service-status.paused {
    background: var(--text-muted);
    color: var(--text-primary);
}

.service-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vehicle-count {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius-small);
    min-width: 3rem;
    text-align: center;
    border: 1px solid var(--primary-dark);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-areas: 
            "header"
            "map";
    }
    
    .side-panel {
        position: fixed;
        top: 60px;
        left: 0;
        width: 350px;
        height: calc(100vh - 60px);
        transform: translateX(-100%);
        z-index: 1001;
    }
    
    .side-panel.open {
        transform: translateX(0);
    }
    
    .header-center {
        display: none;
    }
    
    .panel-nav-btn span {
        display: none;
    }
    
    .property-item {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }
    
    .coordinate-pair {
        flex-direction: column;
        gap: 0.25rem;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
