/* File: voting-dashboard/assets/css/r2v-dashboard.css */

/* Dashboard Background & Spacing */
#r2v-dashboard-wrapper {
    padding: 25px;
    background-color: #f8f9fa; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #334155;
}

/* Header & Title */
#r2v-election-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0;
}

#r2v-countdown-timer {
    background-color: #fce8e8;
    border: 1px solid #f87171;
    color: #dc2626;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 700;
    display: inline-block;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.1);
}

/* Card Styling */
#r2v-dashboard-wrapper .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
    overflow: hidden;
}

/* Card Headers */
#r2v-dashboard-wrapper .card-header {
    background-color: #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    padding: 16px 20px;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1e293b;
}

/* "View Details" Link Placeholder */
.r2v-view-details {
    font-size: 0.85rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}
.r2v-view-details:hover {
    text-decoration: underline;
    color: #2563eb;
}

/* Widget 1: Live Stats Formatting */
#w1-container {
    padding: 30px 10px;
}
.r2v-stat-block {
    text-align: center;
    flex: 1;
    border-right: 1px solid #e2e8f0;
}
.r2v-stat-block:last-child {
    border-right: none;
}
.r2v-stat-block h5 {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}
.r2v-stat-block h3 {
    font-size: 2.8rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0;
    line-height: 1;
}
.r2v-stat-block h3.text-success {
    color: #16a34a !important;
}
.r2v-stat-block small {
    font-size: 1.2rem;
    color: #16a34a;
    font-weight: 600;
}

/* Chart Canvas Constraints */
.r2v-chart-wrapper {
    position: relative;
    height: 300px;
    width: 100%;
    padding: 15px;
}

/* Map specific height */
#w4-geo-map {
    height: 350px;
    width: 100%;
    z-index: 1;
}


/* Screen Options Panel */
#r2v-screen-options .card {
    border-top: 4px solid #3b82f6; 
}

/* Summary Cards (Top Row) */
.r2v-summary-card {
    border-left: 5px solid #e2e8f0;
    transition: transform 0.2s ease-in-out;
}
.r2v-summary-card:hover {
    transform: translateY(-3px);
}
.r2v-summary-card:nth-child(1) { border-left-color: #3b82f6; } 
.r2v-summary-card:nth-child(2) { border-left-color: #ef4444; } 
.r2v-summary-card:nth-child(3) { border-left-color: #10b981; } 
.r2v-summary-card:nth-child(4) { border-left-color: #f59e0b; } 

#w1-container .r2v-stat-block {
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 0;
}
#w1-container .r2v-stat-block:last-child {
    border-bottom: none;
}


.r2v-view-details {
    font-size: 0.85rem;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}
.r2v-view-details:hover {
    text-decoration: underline;
    color: #1d4ed8;
}

/* * PRINT & EXPORT STYLES
 * Safely formats the layout for PDF without breaking multi-page flow 
 */
@media print {
    /* 1. Hide common WordPress Theme elements (Headers, Footers, Sidebars) */
    header, footer, nav, aside, .sidebar, .menu, #wpadminbar, .site-header, .site-footer {
        display: none !important;
    }

    body, html {
        background-color: #ffffff !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #r2v-dashboard-wrapper {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
    }
    #r2v-share-btn, 
    #r2v-export-btn, 
    [data-bs-target="#r2v-screen-options"], 
    #r2v-screen-options,
    .r2v-view-details,
    .form-switch,
    .r2v-trend-view-toggle,
    .r2v-trend-interval-toggle,
    .btn-group,
    button,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_info,
    .dataTables_paginate {
        display: none !important;
    }

    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        margin-bottom: 20px !important;
    }

    .r2v-chart-wrapper canvas {
        max-width: 100% !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
    .table-responsive {
        overflow: visible !important;
    }
    .table {
        width: 100% !important;
    }
}