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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

/* Map container - full viewport */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
}

/* Sidebar styling */
.sidebar {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 320px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

/* User info styling */
.user-info {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.user-info #user-status {
    font-size: 12px;
    color: #2c3e50;
    font-weight: 500;
}

.user-info.connected {
    background: rgba(76, 175, 80, 0.1);
    border-color: rgba(76, 175, 80, 0.3);
}

.user-info.connected #user-status {
    color: #2e7d32;
}

/* Form styling */
#report-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-weight: 600;
    color: #34495e;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

button[type="submit"] {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

button[type="submit"]:active {
    transform: translateY(0);
}

/* Form message styling */
#form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    min-height: 20px;
    transition: all 0.3s ease;
}

/* View controls styling */
.view-controls {
    margin-top: 20px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.view-controls h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 16px;
    font-weight: 600;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #34495e;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.control-group label:hover {
    background: rgba(52, 152, 219, 0.1);
}

.control-group input[type="radio"] {
    margin: 0;
    accent-color: #3498db;
}

#form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#form-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive design */
@media (max-width: 768px) {
    .sidebar {
        width: calc(100vw - 40px);
        max-width: 320px;
    }
}

/* Mapbox popup customization */
.mapboxgl-popup-content {
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mapboxgl-popup-content h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 16px;
}

.mapboxgl-popup-content p {
    margin: 5px 0;
    color: #34495e;
    font-size: 14px;
}

.mapboxgl-popup-content .status {
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 5px;
}

.mapboxgl-popup-content .status.good {
    background: #d4edda;
    color: #155724;
}

.mapboxgl-popup-content .status.moderate {
    background: #fff3cd;
    color: #856404;
}

.mapboxgl-popup-content .status.poor {
    background: #f8d7da;
    color: #721c24;
}
