/**
 * Housing Data Dashboard Styles
 * Version: 1.0.0
 */

/* ===========================
   Zone 1 - Ticker
   =========================== */
.hdd-ticker {
    background-color: #dc2626;
    color: #ffffff;
    padding: 1rem 0;
    overflow: hidden;
    position: relative;
}

.hdd-ticker-content {
    display: flex;
    white-space: nowrap;
    animation: scroll 30s linear infinite;
}

.hdd-ticker-item {
    display: inline-block;
    padding: 0 3rem;
    font-family: 'Courier New', monospace;
    font-size: 1rem;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.hdd-ticker:hover .hdd-ticker-content {
    animation-play-state: paused;
}

/* ===========================
   Zones 2-4 - Content Areas
   =========================== */
.hdd-zone {
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.hdd-zone-2 {
    background-color: #f9fafb;
}

.hdd-zone-3 {
    background-color: #ffffff;
}

.hdd-zone-4 {
    background-color: #f3f4f6;
}

/* ===========================
   Display Container
   =========================== */
.hdd-display {
    margin-bottom: 2rem;
}

/* ===========================
   Common Display Elements
   =========================== */
.stat-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.stat-box:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat-box h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.125rem;
    color: #374151;
    font-weight: 600;
}

.big-number {
    font-size: 3rem;
    font-weight: 700;
    color: #dc2626;
    line-height: 1;
    margin: 1rem 0;
}

.stat-box p {
    color: #6b7280;
    margin: 1rem 0;
    line-height: 1.6;
}

.stat-box small {
    color: #9ca3af;
    font-size: 0.875rem;
}

.stat-box small a {
    color: #dc2626;
    text-decoration: none;
}

.stat-box small a:hover {
    text-decoration: underline;
}

/* ===========================
   Grid Layouts
   =========================== */
.hdd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 0 1rem;
}

.hdd-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

/* ===========================
   Status Indicators
   =========================== */
.status-indicator {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-recent {
    background-color: #d1fae5;
    color: #065f46;
}

.status-dated {
    background-color: #fef3c7;
    color: #92400e;
}

.status-warning {
    background-color: #fee2e2;
    color: #991b1b;
}

/* ===========================
   Progress Bars / Charts
   =========================== */
.progress-bar {
    width: 100%;
    height: 24px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    transition: width 0.3s ease;
}

.progress-green {
    background-color: #10b981;
}

.progress-yellow {
    background-color: #f59e0b;
}

.progress-orange {
    background-color: #f97316;
}

.progress-red {
    background-color: #dc2626;
}

.progress-darkred {
    background-color: #991b1b;
}

/* ===========================
   Heat Map Styles
   =========================== */
.heatmap-row {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.heatmap-row:hover {
    transform: translateX(4px);
}

.heatmap-label {
    flex: 0 0 200px;
    font-weight: 500;
    color: #374151;
}

.heatmap-bar {
    flex: 1;
    height: 32px;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.heatmap-value {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-weight: 600;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Heat map color classes */
.heat-green {
    background-color: #10b981;
}

.heat-yellow {
    background-color: #f59e0b;
}

.heat-orange {
    background-color: #f97316;
}

.heat-red {
    background-color: #dc2626;
}

.heat-darkred {
    background-color: #991b1b;
}

/* ===========================
   Comparison Styles
   =========================== */
.comparison-container {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.comparison-item {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

.comparison-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #374151;
}

.comparison-label {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.comparison-change {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.change-positive {
    color: #dc2626;
}

.change-negative {
    color: #10b981;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 768px) {
    .hdd-ticker-item {
        font-size: 0.875rem;
        padding: 0 1.5rem;
    }
    
    .big-number {
        font-size: 2rem;
    }
    
    .hdd-grid {
        grid-template-columns: 1fr;
    }
    
    .heatmap-label {
        flex: 0 0 120px;
        font-size: 0.875rem;
    }
    
    .comparison-container {
        flex-direction: column;
        gap: 1rem;
    }
}

/* ===========================
   Utility Classes
   =========================== */
.text-center {
    text-align: center;
}

.text-red {
    color: #dc2626;
}

.text-gray {
    color: #6b7280;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}