/**
 * WattsUp Africa Map - Main Map Styles
 * Based on approved brand guidelines
 * 
 * Colors:
 * - Primary Green: #2c8e3c
 * - Highlight Orange: #f7941d
 * - Accent Blue: #00a5cf
 * - Accent Blue Dark: #007c91
 * - Background Beige: #f5f0e1
 */

/* Force full-width display breaking WordPress theme constraints - HIGH SPECIFICITY */
.wattsup-map-wrapper.wattsup-map-wrapper {
    box-sizing: border-box !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
}

/* WordPress theme compatibility - break out of content width - ULTRA HIGH SPECIFICITY */
.entry-content .wattsup-map-wrapper.wattsup-map-wrapper,
.post-content .wattsup-map-wrapper.wattsup-map-wrapper,
.page-content .wattsup-map-wrapper.wattsup-map-wrapper,
.content .wattsup-map-wrapper.wattsup-map-wrapper,
.site-content .wattsup-map-wrapper.wattsup-map-wrapper,
.main-content .wattsup-map-wrapper.wattsup-map-wrapper,
article .wattsup-map-wrapper.wattsup-map-wrapper {
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
}

/* Full-width option for very constrained themes */
.wattsup-map-wrapper.full-width {
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    max-width: 100vw;
}

/* ==========================================================================
   Map Container Styles
   ========================================================================== */

.wattsup-map-wrapper.wattsup-map-wrapper {
    position: relative !important;
    background: linear-gradient(135deg, #ffffff 0%, #f9f5ed 100%) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(44, 142, 60, 0.15) !important;
    border: 1px solid rgba(44, 142, 60, 0.1) !important;
    margin: 20px auto;
    width: 100%;
    max-width: 1400px;
    min-width: 300px;
}

.wattsup-map-container {
    position: relative;
    width: 100%;
    height: 600px;
    min-height: 500px;
    background-color: #f9f5ed;
    font-family: 'Open Sans', Arial, sans-serif;
}

/* Make map take more viewport space when no specific height is set */
.wattsup-map-container:not([style*="height"]) {
    height: 70vh;
    min-height: 600px;
    max-height: 800px;
}

#wattsup-map {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Remove focus outline from map container */
#wattsup-map:focus,
.wattsup-map-container:focus,
.leaflet-container:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* Remove focus outline from map when clicked/active */
.leaflet-container {
    outline: none !important;
}

.leaflet-container:focus {
    outline: none !important;
    border: none !important;
}

/* Zoom controls are positioned via JavaScript using Leaflet's control positioning */

/* ==========================================================================
   Leaflet Attribution Styling
   ========================================================================== */

/* Make attribution text lighter and more subtle */
.leaflet-control-attribution {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    border-radius: 4px !important;
    font-size: 11px !important;
    color: #666 !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

.leaflet-control-attribution a {
    color: #007c91 !important;
    text-decoration: none !important;
}

.leaflet-control-attribution a:hover {
    color: #2c8e3c !important;
    text-decoration: underline !important;
}

/* Additional Leaflet control styling - for scale, zoom info, etc. */
.leaflet-control-scale,
.leaflet-control-scale-line {
    background: rgba(255, 255, 255, 0.8) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #666 !important;
    font-size: 11px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Style any other potential controls */
.leaflet-control {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

/* Ensure zoom controls have consistent styling */
.leaflet-control-zoom a {
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #2c8e3c !important;
}

/* Target any horizontal lines or borders that might appear */
.leaflet-control::after,
.leaflet-control::before {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================================================
   Floating Filter Bar
   ========================================================================== */

.wattsup-filter-bar {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(223deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 148, 29, 0.1) 100%);
    border-radius: 16px;
    padding: 15px 20px;
    box-shadow: 
        0 4px 20px rgba(44, 142, 60, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 1001;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: nowrap;
    overflow-x: auto;
    min-height: 50px;
}

/* Search Input */
.wattsup-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.wattsup-search-icon {
    position: absolute;
    left: 15px;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.wattsup-search-icon circle,
.wattsup-search-icon path {
    stroke: #2c8e3c;
}

.wattsup-search {
    padding: 8px 15px 8px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    width: 200px;
    font-size: 14px;
    font-family: 'Open Sans', Arial, sans-serif;
    transition: all 0.3s ease;
}

.wattsup-search:focus {
    outline: none;
    border-color: #2c8e3c;
    box-shadow: 0 0 0 3px rgba(44, 142, 60, 0.1);
}

/* Dropdown Filters */
.wattsup-dropdown {
    padding: 8px 30px 8px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    font-size: 14px;
    font-family: 'Open Sans', Arial, sans-serif;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23666' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    min-width: 160px;
    width: auto;
}

.wattsup-dropdown:hover {
    border-color: #f7941d;
}

.wattsup-dropdown:focus {
    outline: none;
    border-color: #2c8e3c;
    box-shadow: 0 0 0 3px rgba(44, 142, 60, 0.1);
}

/* Filter Right Section */
.wattsup-filter-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.wattsup-project-count {
    font-size: 13px;
    color: #333;
    align-self: center;
    font-weight: 500;
}

.wattsup-project-count strong {
    color: #2c8e3c;
    font-weight: 700;
}

/* Reset Button */
.wattsup-reset-btn {
    padding: 8px 20px;
    background: linear-gradient(135deg, #f7941d 0%, #ff9f40 100%);
    border: none;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    font-family: 'Open Sans', Arial, sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(247, 148, 29, 0.3);
}

.wattsup-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 148, 29, 0.4);
}

/* ==========================================================================
   Loading State - Modern Design
   ========================================================================== */

.wattsup-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(249, 245, 237, 0.95) 100%);
    padding: 40px 50px;
    border-radius: 20px;
    box-shadow: 
        0 20px 60px rgba(44, 142, 60, 0.15),
        0 8px 30px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    z-index: 10000;
    text-align: center;
    border: 1px solid rgba(44, 142, 60, 0.1);
    backdrop-filter: blur(10px);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* Hide spinner - no animation needed */
.wattsup-loading .spinner {
    display: none !important;
}

.wattsup-loading .spinner .dot {
    display: none !important;
}

/* Loading text styling */
.wattsup-loading .loading-text {
    color: #2c8e3c;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.wattsup-loading .loading-subtitle {
    color: #6c757d;
    font-size: 13px;
    font-weight: 400;
    opacity: 0.8;
}

/* Remove all loading animations and spinners */
.wattsup-loading.circular .spinner {
    display: none !important;
}

/* Disable all loading animations */
.wattsup-loading {
    animation: none !important;
}

/* Hide when loading is complete */
.wattsup-loading.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Force hide any loading elements (emergency override) */
.wattsup-map-container .wattsup-loading[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
}

/* ==========================================================================
   Map Legend
   ========================================================================== */

.wattsup-legend {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    padding: 15px 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: 'Open Sans', Arial, sans-serif;
}

.wattsup-legend-title {
    font-weight: 600;
    color: #2c8e3c;
    margin-bottom: 10px;
    font-size: 14px;
}

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

.wattsup-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid;
}

.wattsup-legend-dot.solar {
    border-color: #f7941d;
    background: rgba(247, 148, 29, 0.3);
}

.wattsup-legend-dot.wind {
    border-color: #00a5cf;
    background: rgba(0, 165, 207, 0.3);
}

.wattsup-legend-dot.hydro {
    border-color: #00a5cf;
    background: rgba(0, 165, 207, 0.3);
}

/* ==========================================================================
   Map Popup Styles - Modern Design
   ========================================================================== */

.leaflet-popup-content-wrapper {
    background: #ffffff !important;
    border-radius: 20px !important;
    box-shadow: 
        0 10px 40px rgba(44, 142, 60, 0.15),
        0 4px 20px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid rgba(44, 142, 60, 0.08) !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.leaflet-popup {
    z-index: 1002 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
    line-height: 1.4 !important;
    min-width: 360px !important;
    max-width: 420px !important;
    width: auto !important;
    box-sizing: border-box !important;
}

.leaflet-popup-tip {
    background: #ffffff !important;
}

/* Modern Popup Layout */
.wattsup-popup-modern.wattsup-popup-modern {
    padding: 0 !important;
    color: #333 !important;
    box-sizing: border-box !important;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
}

/* Header Section */
.popup-header-modern.popup-header-modern {
    background: linear-gradient(135deg, #2c8e3c 0%, #34a853 100%) !important;
    color: white !important;
    padding: 16px 18px !important;
    position: relative !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.popup-title-row.popup-title-row,
.leaflet-popup .popup-title-row,
.leaflet-popup-content .popup-title-row,
.wattsup-popup-modern .popup-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 6px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    padding: 0 !important;
    justify-content: flex-start !important;
}

.popup-energy-icon.popup-energy-icon {
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.15) !important;
    border-radius: 50% !important;
    backdrop-filter: blur(10px) !important;
    box-sizing: border-box !important;
}

.popup-energy-icon.popup-energy-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: white !important;
}

.popup-title.popup-title,
h3.popup-title.popup-title,
.leaflet-popup h3.popup-title,
.leaflet-popup-content h3.popup-title,
.wattsup-popup-modern h3.popup-title {
    margin: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.3 !important;
    flex: 1 !important;
    box-sizing: border-box !important;
    color: white !important;
    text-align: left !important;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segue UI', Roboto, Arial, sans-serif !important;
    padding: 0 !important;
    border: none !important;
    background: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-decoration: none !important;
}

.popup-subtitle.popup-subtitle {
    margin: 0 !important;
    font-size: 13px !important;
    opacity: 0.9 !important;
    font-style: italic !important;
    box-sizing: border-box !important;
    color: white !important;
}

/* Stats Row */
.popup-stats-row.popup-stats-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0 !important;
    background: #f8f9fa !important;
    border-bottom: 1px solid #e9ecef !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.popup-stat.popup-stat {
    padding: 12px 10px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 6px !important;
    border-right: 1px solid #e9ecef !important;
    min-height: 70px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.popup-stat.popup-stat:last-child {
    border-right: none !important;
}

.stat-icon.stat-icon {
    opacity: 0.8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

.stat-icon.stat-icon svg {
    width: 16px !important;
    height: 16px !important;
    stroke: #6c757d !important;
}

.stat-content.stat-content {
    text-align: center !important;
    box-sizing: border-box !important;
}

.stat-value.stat-value {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #2c8e3c !important;
    margin-bottom: 2px !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
    hyphens: auto !important;
    box-sizing: border-box !important;
}

.stat-label.stat-label {
    font-size: 11px !important;
    color: #6c757d !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 500 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* Content Sections */
.popup-section.popup-section {
    padding: 12px 18px !important;
    border-bottom: 1px solid #f1f3f4 !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.popup-section.popup-section:last-of-type {
    border-bottom: none !important;
}

.section-header.section-header {
    display: flex !important;
    align-items: center !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    gap: 8px;
    margin-bottom: 10px;
}

.section-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 4px;
}

.section-icon svg {
    width: 14px;
    height: 14px;
    stroke: #6c757d;
}

.section-title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
}

.section-content {
    font-size: 14px;
    line-height: 1.5;
}

/* Location Specific */
.location-text {
    color: #495057;
    font-weight: 500;
    margin-bottom: 4px;
}

.coordinates {
    color: #6c757d;
    font-size: 12px;
    font-family: 'Courier New', monospace;
}

/* Organizations */
.org-item {
    margin-bottom: 6px;
    color: #495057;
}

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

.org-label {
    font-weight: 500;
    color: #6c757d;
    font-size: 13px;
}

/* Action Buttons */
.popup-actions.popup-actions {
    padding: 10px 16px !important;
    background: #f8f9fa !important;
    display: flex !important;
    gap: 8px !important;
    border-top: 1px solid #e9ecef !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.popup-btn.popup-btn {
    flex: 1 !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    min-height: 28px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.popup-btn-primary.popup-btn-primary {
    background: linear-gradient(135deg, #2c8e3c 0%, #34a853 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(44, 142, 60, 0.3) !important;
    text-decoration: none !important;
}

.popup-btn-primary.popup-btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(44, 142, 60, 0.4) !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.popup-btn-primary.popup-btn-primary:visited {
    color: #ffffff !important;
}

.popup-btn-primary.popup-btn-primary:focus {
    color: #ffffff !important;
    text-decoration: none !important;
}

.popup-btn-secondary.popup-btn-secondary {
    background: #e9ecef !important;
    color: #495057 !important;
    border: 1px solid #dee2e6 !important;
}

.popup-btn-secondary.popup-btn-secondary:hover {
    background: #dee2e6 !important;
    transform: translateY(-1px) !important;
}

.popup-btn.popup-btn svg {
    width: 14px !important;
    height: 14px !important;
}

/* Legacy Badge Styles for Compatibility */
.wattsup-energy-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.wattsup-energy-badge.solar {
    background: #f7941d;
    color: white;
}

.wattsup-energy-badge.wind {
    background: #00a5cf;
    color: white;
}

.wattsup-energy-badge.hydro {
    background: #00a5cf;
    color: white;
}

/* ==========================================================================
   Marker Styles
   ========================================================================== */

.wattsup-marker {
    transition: all 0.3s ease;
}

.wattsup-marker:hover {
    transform: scale(1.1);
}

/* Marker clusters with semi-transparent background like project markers */
.marker-cluster {
    background: rgba(255, 255, 255, 0.1) !important;
}

.marker-cluster div {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #000000 !important;
    border: 2px solid #495057 !important;
    font-weight: 600 !important;
    font-family: 'Open Sans', Arial, sans-serif !important;
}

.marker-cluster-small {
    background: rgba(255, 255, 255, 0.1) !important;
}

.marker-cluster-small div {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #000000 !important;
    border: 2px solid #495057 !important;
}

.marker-cluster-medium {
    background: rgba(255, 255, 255, 0.1) !important;
}

.marker-cluster-medium div {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #000000 !important;
    border: 2px solid #495057 !important;
}

.marker-cluster-large {
    background: rgba(255, 255, 255, 0.1) !important;
}

.marker-cluster-large div {
    background: rgba(255, 255, 255, 0.7) !important;
    color: #000000 !important;
    border: 2px solid #495057 !important;
}

/* ==========================================================================
   Country Cluster Markers (Zoom-Aware Loading)
   ========================================================================== */

.wattsup-country-cluster {
    background: none !important;
    border: none !important;
}

.wattsup-cluster-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(180, 180, 180, 0.8);
    border-radius: 50%;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.wattsup-cluster-icon:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(120, 120, 120, 0.9);
    box-shadow: 
        0 6px 16px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.wattsup-cluster-icon .cluster-count {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.wattsup-cluster-icon .cluster-name {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    margin-top: 2px;
    max-width: 90%;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    line-height: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wattsup-cluster-popup h3 {
    margin: 0 0 10px 0;
    color: #2c8e3c;
    font-size: 18px;
}

.wattsup-cluster-popup p {
    margin: 5px 0;
    font-size: 14px;
}

.wattsup-cluster-popup .cluster-action {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-style: italic;
    color: #666;
    font-size: 13px;
}

/* ==========================================================================
   Summary Panel Styles (Fixed Font Sizes)
   ========================================================================== */

.wattsup-summary {
    margin: 20px 0;
    padding: 20px;
    background: #f5f0e1;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-family: 'Open Sans', Arial, sans-serif;
}

.wattsup-summary-inner {
    position: relative;
}

.wattsup-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 20px;
    align-items: stretch;
}

.wattsup-stat-card {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 24px 16px !important;
    min-height: 140px !important;
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease !important;
    text-align: center !important;
}

.wattsup-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(44, 142, 60, 0.15);
}

.stat-content {
    width: 100%;
}

.stat-value,
.wattsup-stat-card .stat-value,
.wattsup-summary .stat-value,
div.wattsup-stat-card div.stat-value {
    font-size: 48px !important;
    font-weight: 700 !important;
    color: #2c8e3c !important;
    line-height: 1.1 !important;
    margin-bottom: 8px !important;
    display: block !important;
}

.stat-label,
.wattsup-stat-card .stat-label,
.wattsup-summary .stat-label,
div.wattsup-stat-card div.stat-label {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #555555 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.stat-breakdown {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 12px;
}

.breakdown-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: #f8f8f8;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.breakdown-value {
    font-size: 24px;
    font-weight: 700;
    color: #2c8e3c;
}

.breakdown-label {
    font-size: 13px;
    font-weight: 600;
    color: #555555;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1200px) {
    .wattsup-filter-bar {
        gap: 10px;
    }
    
    .wattsup-search {
        width: 180px;
    }
    
    .wattsup-dropdown {
        font-size: 13px;
        padding: 8px 25px 8px 12px;
    }
}

@media (max-width: 1024px) {
    .wattsup-filter-bar {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .wattsup-search {
        width: 150px;
    }
    
    .wattsup-dropdown {
        flex: 1;
        min-width: 140px;
        font-size: 12px;
    }

}

@media (max-width: 768px) {
    .wattsup-map-container {
        height: 60vh !important;
        min-height: 400px !important;
    }
    
    .wattsup-filter-bar {
        top: 10px;
        left: 10px;
        right: 10px;
        padding: 12px 15px;
    }
    
    .wattsup-filter-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .wattsup-legend {
        bottom: 10px;
        right: 10px;
        left: 10px;
        padding: 12px 15px;
    }
    
    .leaflet-popup-content {
        min-width: 320px !important;
        max-width: 380px !important;
    }
    
    .popup-header-modern {
        padding: 16px;
    }
    
    .popup-title {
        font-size: 16px;
    }
    
    .popup-stats-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .popup-section {
        padding: 12px 16px;
    }
    
    .popup-actions {
        padding: 12px 16px;
        flex-direction: column;
    }
    
    .popup-btn {
        width: 100%;
    }
    
    /* Mobile adjustments handled via JavaScript positioning */

}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.wattsup-filter-bar *:focus-visible {
    outline: 2px solid #2c8e3c;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .wattsup-filter-bar {
        background: linear-gradient(223deg, rgba(255, 255, 255, 0.9) 0%, rgba(247, 148, 29, 0.1) 100%);
    }
    
    .wattsup-legend {
        background: rgba(255, 255, 255, 0.95);
    }
}