/**
 * Enhanced Styles for the HVAC Community Events Single Event Summary Template
 * 
 * @version 2.0.0
 */

/* Main Container */
.hvac-event-summary-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--hvac-spacing-xl) var(--hvac-spacing-md);
}

/* Page Header */
.hvac-event-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--hvac-spacing-xl);
    flex-wrap: wrap;
    border-bottom: 1px solid var(--hvac-border);
    padding-bottom: var(--hvac-spacing-md);
}

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

.hvac-event-summary-title .event-date {
    color: var(--hvac-text-light);
    font-size: 1.1rem;
    font-weight: 500;
}

.hvac-event-summary-actions {
    display: flex;
    gap: var(--hvac-spacing-sm);
    flex-wrap: wrap;
}

.hvac-event-summary-actions a {
    min-width: 120px;
    text-align: center;
}

/* Quick Stats Cards */
.hvac-event-summary-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--hvac-spacing-md);
    margin-bottom: var(--hvac-spacing-xl);
}

.hvac-event-stat-card {
    flex: 1;
    min-width: 180px;
    background-color: white;
    border-radius: var(--hvac-border-radius);
    box-shadow: var(--hvac-shadow);
    padding: var(--hvac-spacing-lg);
    text-align: center;
    border: 1px solid var(--hvac-border-light);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.hvac-event-stat-card h3 {
    margin: 0 0 var(--hvac-spacing-sm) 0;
    font-size: 1rem;
    color: var(--hvac-text-light);
    font-weight: 600;
}

.hvac-event-stat-card .stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--hvac-primary);
    line-height: 1.2;
    margin-bottom: var(--hvac-spacing-sm);
}

.hvac-event-stat-card .stat-subtext {
    font-size: 0.85rem;
    color: var(--hvac-text-light);
}

/* Event Details Section */
.hvac-event-summary-details {
    margin-bottom: var(--hvac-spacing-xl);
    padding: var(--hvac-spacing-xl);
    border: 1px solid var(--hvac-border);
    border-radius: var(--hvac-border-radius);
    background-color: white;
    box-shadow: var(--hvac-shadow);
}

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

.hvac-event-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--hvac-spacing-lg);
    margin-bottom: var(--hvac-spacing-lg);
}

.hvac-event-detail-item h3 {
    margin-top: 0;
    margin-bottom: var(--hvac-spacing-sm);
    font-size: 1.1rem;
    color: var(--hvac-secondary);
    font-weight: 600;
}

.hvac-event-detail-item p {
    color: var(--hvac-text);
    margin: 0;
    line-height: 1.5;
}

.hvac-event-description {
    margin-top: var(--hvac-spacing-lg);
    padding-top: var(--hvac-spacing-lg);
    border-top: 1px dashed var(--hvac-border);
}

.hvac-event-description h3 {
    margin-top: 0;
    margin-bottom: var(--hvac-spacing-md);
    font-size: 1.2rem;
    color: var(--hvac-text);
}

/* Attendees Section */
.hvac-event-summary-attendees {
    margin-bottom: var(--hvac-spacing-xl);
    padding: var(--hvac-spacing-xl);
    border: 1px solid var(--hvac-border);
    border-radius: var(--hvac-border-radius);
    background-color: white;
    box-shadow: var(--hvac-shadow);
}

.hvac-event-summary-attendees h2 {
    margin-top: 0;
    margin-bottom: var(--hvac-spacing-lg);
    font-size: 1.4rem;
    color: var(--hvac-text);
    padding-bottom: var(--hvac-spacing-sm);
    border-bottom: 1px solid var(--hvac-border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hvac-attendee-count {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: var(--hvac-primary-light);
    color: var(--hvac-primary);
    border-radius: var(--hvac-border-radius);
    font-size: 0.9rem;
    font-weight: 600;
}

/* Table Styling */
.hvac-transactions-table-wrapper {
    overflow-x: auto;
    border: 1px solid var(--hvac-border);
    border-radius: var(--hvac-border-radius);
}

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

.hvac-transactions-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);
}

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

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

.hvac-transactions-table .attendee-name {
    font-weight: 600;
    color: var(--hvac-text);
}

.hvac-transactions-table .ticket-type {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: var(--hvac-secondary-light);
    color: var(--hvac-secondary-dark);
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Revenue & Transactions Section */
.hvac-event-summary-transactions {
    margin-bottom: var(--hvac-spacing-xl);
    padding: var(--hvac-spacing-xl);
    border: 1px solid var(--hvac-border);
    border-radius: var(--hvac-border-radius);
    background-color: white;
    box-shadow: var(--hvac-shadow);
}

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

.hvac-revenue-summary {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--hvac-spacing-md);
    margin-bottom: var(--hvac-spacing-lg);
    padding: var(--hvac-spacing-md);
    background-color: var(--hvac-primary-light);
    border-radius: var(--hvac-border-radius);
}

.hvac-revenue-item {
    flex: 1;
    min-width: 180px;
    text-align: center;
}

.hvac-revenue-item h3 {
    margin: 0 0 var(--hvac-spacing-xs) 0;
    font-size: 0.9rem;
    color: var(--hvac-text-light);
    font-weight: 600;
}

.hvac-revenue-item .revenue-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hvac-primary);
}

/* No Attendees Message */
.hvac-no-attendees {
    padding: var(--hvac-spacing-lg);
    background-color: var(--hvac-secondary-light);
    border-radius: var(--hvac-border-radius);
    text-align: center;
    color: var(--hvac-secondary-dark);
    font-weight: 500;
}

/* Certificate Actions */
.hvac-cert-action {
    display: inline-block;
    margin-left: 5px;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-decoration: none;
    color: #ffffff;
    background-color: var(--hvac-primary, #0073aa);
    transition: background-color 0.2s ease;
}

.hvac-cert-action:hover {
    background-color: var(--hvac-primary-dark, #005a87);
    color: #ffffff;
    text-decoration: none;
}

.hvac-view-certificate {
    background-color: var(--hvac-secondary, #6c757d);
}

.hvac-view-certificate:hover {
    background-color: var(--hvac-secondary-dark, #495057);
}

.hvac-email-certificate {
    background-color: var(--hvac-primary, #0073aa);
}

.hvac-email-certificate:hover {
    background-color: var(--hvac-primary-dark, #005a87);
}

.hvac-revoke-certificate {
    background-color: var(--hvac-danger, #dc3545);
}

.hvac-revoke-certificate:hover {
    background-color: var(--hvac-danger-dark, #bd2130);
}

/* Certificate Modal */
.hvac-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.hvac-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: var(--hvac-border-radius, 4px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.hvac-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 15px;
}

.hvac-modal-close:hover,
.hvac-modal-close:focus {
    color: #000;
    text-decoration: none;
}

.hvac-modal-body {
    padding: 10px 0;
    min-height: 200px;
}

.hvac-loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

.hvac-error {
    color: #dc3545;
    padding: 10px;
    text-align: center;
    background-color: #f8d7da;
    border-radius: 4px;
    margin: 10px 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hvac-event-summary-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hvac-event-summary-actions {
        margin-top: var(--hvac-spacing-md);
        width: 100%;
    }
    
    .hvac-event-summary-actions a {
        flex: 1;
        min-width: unset;
    }
    
    .hvac-event-summary-details,
    .hvac-event-summary-attendees,
    .hvac-event-summary-transactions {
        padding: var(--hvac-spacing-md);
    }
    
    .hvac-event-detail-grid {
        grid-template-columns: 1fr;
        gap: var(--hvac-spacing-md);
    }
    
    .hvac-revenue-item {
        flex-basis: calc(50% - var(--hvac-spacing-md));
    }
}

@media (max-width: 480px) {
    .hvac-event-summary-title h1 {
        font-size: 1.5rem;
    }
    
    .hvac-event-stat-card {
        flex-basis: 100%;
    }
    
    .hvac-revenue-item {
        flex-basis: 100%;
        margin-bottom: var(--hvac-spacing-sm);
    }
    
    .hvac-event-summary-attendees h2 {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hvac-attendee-count {
        margin-top: var(--hvac-spacing-xs);
    }
}