/* Master Plan Zone Check - Custom Styles */
/* Extends gis-tools-common.css */

/* Zone-specific colors */
:root {
    --zone-residential: #4CAF50;
    --zone-commercial: #2196F3;
    --zone-industrial: #9C27B0;
    --zone-agricultural: #8BC34A;
    --zone-mixed: #FF9800;
    --zone-institutional: #00BCD4;
    --zone-reserved: #F44336;
    --zone-openspace: #66BB6A;
    --zone-no-plan: #9E9E9E;
    --zone-other: #607D8B;
}

/* ===============================================
   ZONE STATUS BADGES
   =============================================== */

.mp-zone-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}

.mp-zone-status.residential {
    background: rgba(76, 175, 80, 0.15);
    color: var(--zone-residential);
}

.mp-zone-status.commercial {
    background: rgba(33, 150, 243, 0.15);
    color: var(--zone-commercial);
}

.mp-zone-status.industrial {
    background: rgba(156, 39, 176, 0.15);
    color: var(--zone-industrial);
}

.mp-zone-status.agricultural {
    background: rgba(139, 195, 74, 0.15);
    color: var(--zone-agricultural);
}

.mp-zone-status.mixed {
    background: rgba(255, 152, 0, 0.15);
    color: var(--zone-mixed);
}

.mp-zone-status.institutional {
    background: rgba(0, 188, 212, 0.15);
    color: var(--zone-institutional);
}

.mp-zone-status.reserved {
    background: rgba(244, 67, 54, 0.15);
    color: var(--zone-reserved);
}

.mp-zone-status.openspace {
    background: rgba(102, 187, 106, 0.15);
    color: var(--zone-openspace);
}

.mp-zone-status.no-plan {
    background: rgba(158, 158, 158, 0.15);
    color: var(--zone-no-plan);
}

/* ===============================================
   RESULT CARD ZONE HEADERS
   =============================================== */

.mp-result-header.residential {
    background: linear-gradient(135deg, var(--zone-residential) 0%, #66BB6A 100%);
}

.mp-result-header.commercial {
    background: linear-gradient(135deg, var(--zone-commercial) 0%, #42A5F5 100%);
}

.mp-result-header.industrial {
    background: linear-gradient(135deg, var(--zone-industrial) 0%, #AB47BC 100%);
}

.mp-result-header.agricultural {
    background: linear-gradient(135deg, var(--zone-agricultural) 0%, #9CCC65 100%);
}

.mp-result-header.mixed {
    background: linear-gradient(135deg, var(--zone-mixed) 0%, #FFA726 100%);
}

.mp-result-header.institutional {
    background: linear-gradient(135deg, var(--zone-institutional) 0%, #26C6DA 100%);
}

.mp-result-header.reserved {
    background: linear-gradient(135deg, var(--zone-reserved) 0%, #EF5350 100%);
}

.mp-result-header.openspace {
    background: linear-gradient(135deg, var(--zone-openspace) 0%, #81C784 100%);
}

.mp-result-header.no-plan {
    background: linear-gradient(135deg, var(--zone-no-plan) 0%, #BDBDBD 100%);
}

/* ===============================================
   LEGEND COLORS
   =============================================== */

.gis-legend-color.residential { background: var(--zone-residential); }
.gis-legend-color.commercial { background: var(--zone-commercial); }
.gis-legend-color.industrial { background: var(--zone-industrial); }
.gis-legend-color.agricultural { background: var(--zone-agricultural); }
.gis-legend-color.mixed { background: var(--zone-mixed); }
.gis-legend-color.institutional { background: var(--zone-institutional); }
.gis-legend-color.reserved { background: var(--zone-reserved); }
.gis-legend-color.openspace { background: var(--zone-openspace); }

/* ===============================================
   FSI INFO BOX
   =============================================== */

.mp-fsi-box {
    background: linear-gradient(135deg, var(--bg-gray) 0%, var(--border-gray) 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.mp-fsi-box h6 {
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-fsi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.mp-fsi-item {
    text-align: center;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.mp-fsi-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.mp-fsi-label {
    font-size: 12px;
    color: var(--gray-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===============================================
   REGULATIONS & USES LISTS
   =============================================== */

.mp-regulations-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-gray);
}

.mp-regulations-section h6 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mp-regulations-section h6 i {
    color: var(--primary-color);
}

.mp-regulations-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mp-regulations-list li {
    padding: 8px 0 8px 25px;
    position: relative;
    color: var(--gray-color);
    font-size: 14px;
    border-bottom: 1px solid var(--border-gray);
}

.mp-regulations-list li:last-child {
    border-bottom: none;
}

.mp-regulations-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--success-color);
}

.mp-uses-section {
    margin-top: 20px;
}

.mp-uses-section h6.permitted {
    color: var(--success-color);
}

.mp-uses-section h6.conditional {
    color: var(--warning-color);
}

.mp-uses-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.mp-uses-list .use-tag {
    padding: 6px 12px;
    background: var(--bg-gray);
    border-radius: 20px;
    font-size: 12px;
    color: var(--dark-color);
}

.mp-uses-list.permitted .use-tag {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.mp-uses-list.conditional .use-tag {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
}

/* ===============================================
   CUSTOM MARKERS FOR ZONES
   =============================================== */

.custom-marker {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.custom-marker.residential { background: var(--zone-residential); }
.custom-marker.commercial { background: var(--zone-commercial); }
.custom-marker.industrial { background: var(--zone-industrial); }
.custom-marker.agricultural { background: var(--zone-agricultural); }
.custom-marker.mixed { background: var(--zone-mixed); }
.custom-marker.institutional { background: var(--zone-institutional); }
.custom-marker.reserved { background: var(--zone-reserved); }
.custom-marker.openspace { background: var(--zone-openspace); }
.custom-marker.no-plan { background: var(--zone-no-plan); }

/* ===============================================
   RESPONSIVE ADJUSTMENTS
   =============================================== */

@media (max-width: 768px) {
    .mp-fsi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .mp-fsi-value {
        font-size: 18px;
    }

    .mp-fsi-item {
        padding: 10px;
    }

    .mp-uses-list .use-tag {
        font-size: 11px;
        padding: 5px 10px;
    }
}

/* ── Official HMDA Master Plan 2031 raster sheet viewer ── */
.mp-official-sheet {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid #ffd2bd;
    background: #fff7f2;
    border-radius: 14px;
}
.mp-official-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.mp-official-head h6 {
    margin: 0;
    color: #d8501a;
    font-weight: 700;
    font-size: 16px;
}
.mp-official-tag {
    background: #ff6725;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.mp-official-sub {
    font-size: 13px;
    color: #7a5a4c;
    margin: 0 0 12px;
}
.mp-official-viewer {
    width: 100%;
    height: 460px;
    border-radius: 10px;
    border: 1px solid #ffd2bd;
    background: #faf3ee;
    overflow: hidden;
}
.mp-official-viewer .leaflet-container {
    background: #faf3ee;
    cursor: url(../dashboard/images/icon/grab.svg), grab !important;
}
.mp-official-imgfallback {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 14px;
}
.mp-official-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.mp-official-disclaimer {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #ffd2bd;
    background: #fff;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.6;
    color: #5c4a42;
}
.mp-official-disclaimer strong { color: #d8501a; }
@media (max-width: 768px) {
    .mp-official-viewer { height: 320px; }
}
