/* RHFAS Stats - Modern Mobile-First Design */

/* Container */
.rhfas-stats-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Section Cards */
.rhfas-stats-section {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: box-shadow 0.3s ease;
}

.rhfas-stats-section:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.rhfas-stats-section h2 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    color: #2c3e50;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
}

/* Table Styling - Mobile First */
.rhfas-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
}

/* Mobile: Card-style rows */
@media (max-width: 768px) {
    .rhfas-stats-table thead {
        display: none;
    }

    .rhfas-stats-table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 1rem;
        background: #f9f9f9;
    }

    .rhfas-stats-table tbody tr:last-child {
        background: #e3f2fd;
        border: 2px solid #2196f3;
        font-weight: bold;
    }

    .rhfas-stats-table td {
        display: block;
        text-align: right;
        padding: 0.5rem 0;
        border: none;
        position: relative;
        padding-left: 50%;
    }

    .rhfas-stats-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 45%;
        padding-right: 10px;
        text-align: left;
        font-weight: 600;
        color: #555;
    }

    .rhfas-stats-table td a {
        color: #2196f3;
        text-decoration: none;
        font-weight: 600;
        font-size: 1.2em;
    }

    .rhfas-stats-table td a:hover {
        text-decoration: underline;
        color: #1976d2;
    }
}

/* Desktop: Traditional table */
@media (min-width: 769px) {
    .rhfas-stats-table thead {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
    }

    .rhfas-stats-table th {
        border: none;
        padding: 1rem;
        text-align: left;
        font-weight: 600;
        text-transform: uppercase;
        font-size: 0.85rem;
        letter-spacing: 0.5px;
    }

    .rhfas-stats-table td {
        border: 1px solid #e0e0e0;
        padding: 0.875rem 1rem;
        text-align: left;
    }

    .rhfas-stats-table tbody tr {
        transition: background-color 0.2s ease;
    }

    .rhfas-stats-table tbody tr:nth-child(even) {
        background-color: #f9f9f9;
    }

    .rhfas-stats-table tbody tr:hover {
        background-color: #e3f2fd;
    }

    .rhfas-stats-table tbody tr:last-child {
        background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
        font-weight: bold;
        border-top: 2px solid #2196f3;
    }

    .rhfas-stats-table tbody tr:last-child td {
        font-size: 1.05em;
    }

    .rhfas-stats-table td a {
        color: #2196f3;
        text-decoration: none;
        font-weight: 600;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        transition: all 0.2s ease;
    }

    .rhfas-stats-table td a:hover {
        background-color: #2196f3;
        color: white;
        text-decoration: none;
    }
}

/* Sync Button Styling */
.rhfas-stats-sync-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    color: white;
}

.rhfas-stats-sync-section h3 {
    margin-top: 0;
    color: white;
    font-size: 1.25rem;
}

.rhfas-stats-sync-section p {
    margin-bottom: 1rem;
    opacity: 0.95;
}

.rhfas-stats-sync-section .button {
    background: white;
    color: #667eea;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.rhfas-stats-sync-section .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

#sync-status {
    margin-left: 1rem;
    font-weight: 600;
}

/* Issue Badge */
.issue-badge {
    display: inline-block;
    background: #ff5722;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Responsive grid for multiple sections */
@media (min-width: 1024px) {
    .rhfas-stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .rhfas-stats-grid .rhfas-stats-section {
        margin-bottom: 0;
    }
}

/* Print Styles */
@media print {
    .rhfas-stats-sync-section {
        display: none;
    }

    .rhfas-stats-section {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}
