/**
Theme Name: council-check
Author: Thunderhat
Author URI: http://wpastra.com/about/
Description: Custom child theme for Council Check.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: council-check
Template: astra
*/
/* Councillor Card Styling */
.councillor-card {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    align-items: start;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.councillor-card .avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
}

.councillor-card .details {
    overflow: hidden;
    word-wrap: break-word;
}

.councillor-card .details h4 {
    margin: 0 0 8px;
    font-size: 1.25rem;
    font-weight: bold;
    color: #333;
    white-space: normal;
}

.councillor-card .details .text-muted {
    margin-bottom: 8px;
    font-size: 0.875rem;
    color: #666;
    word-break: break-word;

    /* Single-line with ellipsis */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.councillor-card .stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.875rem;
}

.councillor-card .stats div {
    font-weight: bold;
    color: #333;
    min-width: 80px;
}

.councillor-card .stats div span {
    font-weight: normal;
    color: #666;
}

.councillor-card .attendance-rate {
    display: inline-block;
    padding: 0px 5px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff !important;
    background-color: #6c757d;
    /* fallback if no class */
    white-space: nowrap;
}

.councillor-card .attendance-rate.high {
    background-color: #28a745;
}

.councillor-card .attendance-rate.medium {
    background-color: #ffc107;
    color: #000 !important;
}

.councillor-card .attendance-rate.low {
    background-color: #dc3545;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .councillor-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .councillor-card .avatar {
        margin: 0 auto 12px;
    }

    .councillor-card .stats {
        justify-content: center;
        gap: 8px;
    }

    .councillor-card .stats div {
        min-width: unset;
    }
}

/* Spinner styles */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    border-top-color: #007bff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}