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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
}

/* Full-screen map */
#map {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100%;
}

/* Proof of concept banner */
.poc-banner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: #fef3c7;
    border-bottom: 2px solid #f59e0b;
    color: #92400e;
    padding: 8px 16px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Title bar */
.title-bar {
    position: absolute;
    top: 50px;  /* Moved down to account for POC banner */
    left: 20px;
    background: white;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    z-index: 1;
}

.title-bar h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.title-bar p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Legend */
.legend {
    position: absolute;
    bottom: 30px;
    right: 20px;
    background: white;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1;
    min-width: 220px;
}

.legend h3 {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 13px;
    color: #374151;
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
    margin-right: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

/* Info panel */
.info-panel {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 16px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 1;
    font-size: 13px;
    color: #6b7280;
}

.info-panel p {
    margin-bottom: 4px;
}

.info-panel p:last-child {
    margin-bottom: 0;
}

.info-panel strong {
    color: #1f2937;
}

.data-source {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5e7eb;
}

.data-source a {
    color: #2563eb;
    text-decoration: none;
}

.data-source a:hover {
    text-decoration: underline;
}

/* MapLibre popup customization */
.maplibregl-popup-content {
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    font-family: inherit;
}

.maplibregl-popup-close-button {
    font-size: 20px;
    padding: 4px 8px;
    color: #6b7280;
}

.maplibregl-popup-close-button:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Popup content styling */
.popup-header {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.popup-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

.popup-header .jurisdiction {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.popup-section {
    margin-bottom: 12px;
}

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

.popup-section h4 {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.popup-field {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 13px;
}

.popup-field-label {
    color: #6b7280;
    margin-right: 12px;
}

.popup-field-value {
    color: #1f2937;
    font-weight: 500;
    text-align: right;
}

.popup-housing-type {
    padding: 8px 0;
    border-bottom: 1px solid #f3f4f6;
}

.popup-housing-type:last-child {
    border-bottom: none;
}

.popup-housing-type h5 {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-permitted {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-conditional {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-prohibited {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-yes {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-no {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .poc-banner {
        font-size: 11px;
        padding: 6px 12px;
    }

    .title-bar {
        top: 40px;  /* Adjusted for smaller POC banner */
        left: 10px;
        right: 10px;
        max-width: none;
        padding: 12px 16px;
    }

    .title-bar h1 {
        font-size: 18px;
    }

    .title-bar p {
        font-size: 12px;
    }

    .legend {
        bottom: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 16px;
    }

    .info-panel {
        display: none;
    }
}
