/**
 * CUSTOM Historical Texas Map - Frontend Styles
 * Version: 4.0
 */

/* Container Styles */
#chtm-map-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.chtm-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.chtm-container svg {
    max-width: 100%;
    height: auto;
}

/* Statistics Section */
.counties-count {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.counties-count h3 {
    margin: 0 0 15px 0;
    color: #1e293b;
    font-size: 1.4em;
    font-weight: 600;
}

.status-breakdown-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.95em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Single blue color for all counties */
.status-badge.status-historical {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
}

.status-icon {
    font-size: 1.2em;
}

.status-label {
    font-weight: 500;
}

.status-count {
    font-weight: 700;
    font-size: 1.1em;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 20px;
}

.status-summary {
    margin: 10px 0 0 0;
    color: #64748b;
    font-size: 0.9em;
}

.status-summary strong {
    color: #334155;
}

/* SVG County Styles */
.chtm-container svg path,
.chtm-container svg polygon,
.chtm-container svg rect {
    fill: #e2e8f0;
    stroke: #94a3b8;
    stroke-width: 0.5;
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Hover effect for non-highlighted counties */
.chtm-container svg path:hover,
.chtm-container svg polygon:hover,
.chtm-container svg rect:hover {
    fill: #cbd5e1;
    stroke: #64748b;
}

/* Single blue color for highlighted counties */
.chtm-container svg .has-project {
    fill: #2563eb !important;
    stroke: #1d4ed8 !important;
    stroke-width: 1 !important;
    cursor: pointer;
}

.chtm-container svg .has-project:hover {
    fill: #1d4ed8 !important;
    stroke: #1e40af !important;
    filter: drop-shadow(0 4px 6px rgba(37, 99, 235, 0.4));
    transform: translateY(-1px);
}

/* Tooltip Styles */
.chtm-tooltip {
    position: absolute;
    background: #1e293b;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.chtm-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #1e293b;
}

/* Error Message */
.chtm-error {
    padding: 20px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
    text-align: center;
    margin: 20px 0;
}

/* Responsive */
@media (max-width: 768px) {
    #chtm-map-container {
        padding: 10px;
    }

    .counties-count {
        padding: 15px;
    }

    .status-badge {
        padding: 8px 15px;
        font-size: 0.85em;
    }
}
