/* ===================================================================
   ICSUSA CLIMATE DASHBOARD - FORCE WHITE TEXT OVERRIDE
   =================================================================== */

/* FORCE OVERRIDE WORDPRESS/ASTRA THEME COLORS */
.icsusa-climate-dashboard,
.icsusa-climate-dashboard *,
.icsusa-climate-dashboard h1,
.icsusa-climate-dashboard h2,
.icsusa-climate-dashboard h3,
.icsusa-climate-dashboard p,
.icsusa-climate-dashboard div,
.icsusa-climate-dashboard span {
    color: white !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.icsusa-climate-dashboard {
    line-height: 1.5 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ===================================================================
   STREAMLINED HERO DASHBOARD
   =================================================================== */

.climate-hero-dashboard {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #1e3c72 100%);
    color: white !important;
    padding: 1.5rem;
    margin: 0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.climate-hero-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Streamlined Authority Badge */
.icsusa-climate-dashboard .science-authority-badge {
    background: linear-gradient(45deg, #ef4444, #dc2626) !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 20px !important;
    display: inline-block !important;
    margin-bottom: 1rem !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4) !important;
}

.icsusa-climate-dashboard .badge-text {
    color: white !important;
    display: block !important;
}

.icsusa-climate-dashboard .badge-subtitle {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.7rem !important;
    font-weight: 400 !important;
    margin-top: 0.2rem !important;
    display: block !important;
}

/* Streamlined Title Section */
.icsusa-climate-dashboard .hero-title-section {
    margin-bottom: 1rem !important;
}

.icsusa-climate-dashboard .hero-main-title {
    font-size: 2rem !important;
    font-weight: 600 !important;
    margin: 0 0 0.5rem 0 !important;
    color: white !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5) !important;
    line-height: 1.2 !important;
}

.icsusa-climate-dashboard .highlight-urgent {
    color: #fbbf24 !important;
    font-weight: 700 !important;
}

.icsusa-climate-dashboard .hero-subtitle {
    font-size: 1rem !important;
    font-weight: 400 !important;
    margin: 0 !important;
    color: #e2e8f0 !important;
    opacity: 0.9 !important;
}

/* Streamlined Emergency Banner */
.icsusa-climate-dashboard .climate-emergency-banner {
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1px solid #ef4444 !important;
    border-radius: 8px !important;
    padding: 0.75rem 1rem !important;
    margin: 1rem auto !important;
    max-width: 400px !important;
}

.icsusa-climate-dashboard .emergency-text {
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    color: #fbbf24 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    margin: 0 !important;
}

.icsusa-climate-dashboard .emergency-subtitle {
    font-size: 0.75rem !important;
    color: #cbd5e1 !important;
    margin: 0.2rem 0 0 0 !important;
    font-weight: 500 !important;
}

/* Professional Data Grid */
.live-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.data-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.data-card:hover,
.data-card:focus {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    border-color: rgba(251, 191, 36, 0.5);
}

.data-card.critical {
    border-color: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.2);
}

.data-card.warning {
    border-color: #f59e0b;
    box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.data-card.urgent {
    border-color: #06b6d4;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
}

.data-icon {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
    display: block;
}

.data-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: white !important;
    line-height: 1;
    margin-bottom: 0.2rem;
    font-family: 'SF Mono', monospace;
}

.data-card.critical .data-value { 
    color: #ef4444 !important;
}

.data-card.warning .data-value { 
    color: #f59e0b !important;
}

.data-card.urgent .data-value { 
    color: #06b6d4 !important;
}

.data-unit {
    display: block;
    font-size: 0.7rem;
    color: #cbd5e1 !important;
    margin-bottom: 0.25rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.data-trend {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    margin-bottom: 0.25rem;
}

.data-trend.increasing {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.15);
}

.data-trend.decreasing {
    color: #10b981 !important;
    background: rgba(16, 185, 129, 0.15);
}

.data-context {
    font-size: 0.6rem;
    color: #94a3b8 !important;
    font-style: italic;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.data-source {
    font-size: 0.55rem;
    color: #64748b !important;
    font-weight: 500;
    background: rgba(100, 116, 139, 0.15);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 0.2rem;
}

.click-hint {
    font-size: 0.5rem;
    color: #94a3b8 !important;
    opacity: 0.7;
    margin-top: 0.1rem;
}

.data-card:hover .click-hint {
    opacity: 1;
    color: #fbbf24 !important;
}

/* Streamlined Metrics */
.credibility-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.75rem;
    margin: 1rem auto;
    max-width: 500px;
}

.metric-item {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem 0.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.metric-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fbbf24 !important;
    line-height: 1;
    margin-bottom: 0.2rem;
}

.metric-label {
    font-size: 0.65rem;
    color: #cbd5e1 !important;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Streamlined CTA */
.science-call-to-action {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid #3b82f6;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.cta-text {
    font-size: 1rem;
    color: #fbbf24 !important;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.cta-subtext {
    font-size: 0.85rem;
    color: #e2e8f0 !important;
    font-weight: 400;
}

/* ===================================================================
   POPUP STYLES
   =================================================================== */

.climate-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.climate-popup-content {
    background: white;
    border-radius: 15px;
    max-width: 550px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
}

.popup-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 15px 15px 0 0;
}

.popup-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: white;
}

.popup-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.popup-body {
    padding: 2rem;
    color: #374151;
}

.popup-metric {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.popup-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.popup-trend {
    font-size: 0.95rem;
    color: #666;
    font-weight: 600;
}

.popup-explanation {
    line-height: 1.6;
}

.popup-explanation p {
    margin-bottom: 1rem;
}

.popup-explanation ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.popup-explanation li {
    margin-bottom: 0.5rem;
}

.popup-footer {
    padding: 1.5rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 1rem;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 0 0 15px 15px;
}

.popup-btn {
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.popup-btn:hover {
    background: #2563eb;
    color: white;
    text-decoration: none;
}

.popup-btn.secondary {
    background: #6b7280;
}

.popup-btn.secondary:hover {
    background: #4b5563;
}

/* ===================================================================
   MOBILE RESPONSIVE
   =================================================================== */

@media (max-width: 768px) {
    .climate-hero-dashboard {
        padding: 1rem;
    }
    
    .hero-main-title {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .live-data-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .data-value {
        font-size: 1.3rem;
    }
    
    .credibility-metrics {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .metric-number {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .science-authority-badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }
    
    .hero-main-title {
        font-size: 1.3rem;
    }
    
    .data-value {
        font-size: 1.2rem;
    }
    
    .credibility-metrics {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   ACCESSIBILITY
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus states for accessibility */
.data-card:focus-visible {
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .data-card {
        border-width: 3px;
    }
    
    .data-value {
        font-weight: 900;
    }
}