/*
 * HVAC Trainer Dashboard Styles - Enhanced Version
 *
 * Styles specific to the trainer dashboard page.
 */

/* Dashboard Container */
.hvac-dashboard {
    padding: var(--hvac-spacing-lg);
    background-color: #f9f9f9;
    border-radius: var(--hvac-border-radius);
}

/* Header */
.hvac-dashboard-header {
    margin-bottom: 2em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--hvac-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.hvac-dashboard-header h1 {
    margin: 0 0 var(--hvac-spacing-sm) 0;
    color: var(--hvac-text);
    font-size: 1.8rem;
    font-weight: 600;
}

.hvac-dashboard-nav {
    display: flex;
    gap: var(--hvac-spacing-sm);
    flex-wrap: wrap;
}

.hvac-dashboard-nav a {
    margin: 0;
    min-width: 120px;
    text-align: center;
}

/* Stats Section */
.hvac-dashboard-stats {
    margin-bottom: var(--hvac-spacing-xl);
}

.hvac-dashboard-stats h2 {
    margin-top: 0;
    margin-bottom: var(--hvac-spacing-md);
    font-size: 1.4rem;
    color: var(--hvac-text);
    padding-bottom: var(--hvac-spacing-sm);
    border-bottom: 1px solid var(--hvac-border-light);
}

/* Row layout for stats */
.hvac-stats-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    margin: -10px;
    justify-content: space-between;
    align-items: stretch;
}

.hvac-stat-col {
    flex: 1;
    min-width: 160px;
    padding: 10px;
    margin-bottom: var(--hvac-spacing-sm);
}

.hvac-stat-card {
    border: 1px solid var(--hvac-border);
    border-radius: var(--hvac-border-radius);
    padding: var(--hvac-spacing-lg);
    background: white;
    text-align: center;
    width: 100%;
    flex-grow: 1;
    height: 100%;
    box-shadow: var(--hvac-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hvac-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hvac-shadow-lg);
}

.hvac-stat-card h3 {
    margin-top: 0;
    margin-bottom: var(--hvac-spacing-sm);
    font-size: 1.1em;
    color: var(--hvac-secondary);
    font-weight: 600;
}

.hvac-stat-card p {
    font-size: 2.2em;
    margin: 0.2em 0;
    font-weight: 700;
    line-height: 1.2;
    color: var(--hvac-primary);
}

.hvac-stat-card small {
    display: block;
    margin-top: var(--hvac-spacing-sm);
    font-size: 0.85em;
    color: var(--hvac-text-light);
}

/* Events Section */
.hvac-dashboard-events {
    background: white;
    border-radius: var(--hvac-border-radius);
    padding: var(--hvac-spacing-lg);
    box-shadow: var(--hvac-shadow);
    margin-bottom: var(--hvac-spacing-xl);
}

.hvac-dashboard-events h2 {
    margin-top: 0;
    margin-bottom: var(--hvac-spacing-md);
    font-size: 1.4rem;
    color: var(--hvac-text);
    padding-bottom: var(--hvac-spacing-sm);
    border-bottom: 1px solid var(--hvac-border-light);
}

/* Event Filters */
.hvac-event-filters {
    margin-bottom: var(--hvac-spacing-lg);
    padding: var(--hvac-spacing-md);
    background-color: var(--hvac-secondary-light);
    border-radius: var(--hvac-border-radius);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--hvac-spacing-sm);
}

.hvac-event-filters span {
    margin-right: var(--hvac-spacing-md);
    font-weight: 600;
    color: var(--hvac-secondary-dark);
}

.hvac-filter {
    padding: 0.5rem 1rem !important;
    margin: 0 !important;
}

.hvac-filter-active {
    background-color: var(--hvac-primary) !important;
    color: white !important;
}

/* Events Table */
.hvac-events-table-wrapper {
    overflow-x: auto;
    position: relative;
    min-height: 100px;
    border: 1px solid var(--hvac-border);
    border-radius: var(--hvac-border-radius);
}

.events-table {
    width: 100%;
    border-collapse: collapse;
}

.events-table th {
    background-color: #f8f9fa;
    color: var(--hvac-secondary-dark);
    padding: var(--hvac-spacing-md);
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid var(--hvac-border);
}

.events-table td {
    padding: var(--hvac-spacing-md);
    border-bottom: 1px solid var(--hvac-border-light);
    vertical-align: middle;
}

.events-table tbody tr:hover {
    background-color: var(--hvac-primary-light);
}

.events-table .column-actions {
    white-space: nowrap;
}

.events-table .column-actions a {
    margin-right: var(--hvac-spacing-sm);
    color: var(--hvac-primary);
    text-decoration: none;
    font-weight: 500;
}

.events-table .column-actions a:hover {
    text-decoration: underline;
}

/* Status indicators */
.status-indicator {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-align: center;
}

.status-published {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.status-draft {
    background-color: #eceff1;
    color: #546e7a;
}

.status-pending {
    background-color: #fff3e0;
    color: #ef6c00;
}

/* Loading indicator */
.hvac-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    padding: 20px;
    z-index: 10;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Error message */
.hvac-error {
    color: var(--hvac-error);
    padding: var(--hvac-spacing-md);
    border: 1px solid #ffb8bb;
    background-color: var(--hvac-error-light);
    margin: var(--hvac-spacing-md) 0;
    border-radius: var(--hvac-border-radius);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hvac-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hvac-dashboard-nav {
        margin-top: var(--hvac-spacing-md);
        width: 100%;
    }
    
    .hvac-dashboard-nav a {
        flex: 1;
        min-width: unset;
    }
    
    .hvac-stat-col {
        min-width: 140px;
        flex-basis: calc(50% - 20px);
    }
    
    .hvac-event-filters {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hvac-event-filters span {
        margin-bottom: var(--hvac-spacing-sm);
    }
    
    .hvac-filter {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hvac-stat-col {
        flex-basis: 100%;
    }
}