/**
 * Certificate Styles
 * 
 * Styles for certificate-related pages and components.
 */

/* Certificate Tables */
.hvac-certificate-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.hvac-certificate-table th {
    background-color: #f1f1f1;
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    font-weight: 600;
}

.hvac-certificate-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.hvac-certificate-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.hvac-certificate-table tr:hover {
    background-color: #f0f7ff;
}

/* Certificate Actions */
.hvac-certificate-actions {
    display: flex;
    gap: 8px;
}

.hvac-certificate-actions button,
.hvac-certificate-actions a {
    background-color: #fafafa;
    border: 1px solid #ddd;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
    transition: all 0.2s ease;
    color: #333;
}

.hvac-certificate-actions button:hover,
.hvac-certificate-actions a:hover {
    background-color: #f0f0f0;
    border-color: #ccc;
}

.hvac-view-certificate {
    background-color: #e0f7fa \!important;
    border-color: #80deea \!important;
    color: #006064 \!important;
}

.hvac-view-certificate:hover {
    background-color: #b2ebf2 \!important;
    border-color: #4dd0e1 \!important;
}

.hvac-email-certificate {
    background-color: #e8f5e9 \!important;
    border-color: #a5d6a7 \!important;
    color: #1b5e20 \!important;
}

.hvac-email-certificate:hover {
    background-color: #c8e6c9 \!important;
    border-color: #81c784 \!important;
}

.hvac-revoke-certificate {
    background-color: #ffebee \!important;
    border-color: #ffcdd2 \!important;
    color: #b71c1c \!important;
}

.hvac-revoke-certificate:hover {
    background-color: #ffcdd2 \!important;
    border-color: #ef9a9a \!important;
}

/* Certificate status */
.hvac-status-active {
    color: #2e7d32;
    background-color: #e8f5e9;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
}

.hvac-status-revoked {
    color: #b71c1c;
    background-color: #ffebee;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
}

/* Certificate filters */
.hvac-certificate-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border: 1px solid #eee;
}

.hvac-filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
}

.hvac-filter-group label {
    font-weight: 600;
    font-size: 14px;
}

.hvac-filter-group select,
.hvac-filter-group input {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.hvac-filter-submit {
    align-self: flex-end;
    margin-top: auto;
}

/* Certificate modal */
.hvac-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
}

.hvac-certificate-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    max-width: 90vw;
    max-height: 90vh;
    width: 850px;
    display: none;
}

.hvac-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.hvac-modal-close:hover {
    color: #333;
}

.hvac-certificate-preview {
    width: 100%;
    height: 70vh;
    border: 1px solid #ddd;
    margin-top: 10px;
}

.hvac-modal-title {
    margin-top: 0;
    margin-bottom: 15px;
    padding-right: 30px;
}

/* Button loading state */
.hvac-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.hvac-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #333;
    border-radius: 50%;
    animation: hvac-spin 1s linear infinite;
    position: absolute;
    right: 8px;
    top: calc(50% - 6px);
}

@keyframes hvac-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Empty state message */
.hvac-no-certificates {
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
    text-align: center;
    margin: 20px 0;
}

/* Stats cards */
.hvac-certificate-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.hvac-stat-card {
    background-color: white;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.hvac-stat-card h3 {
    margin-top: 0;
    font-size: 16px;
    color: #555;
}

.hvac-stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin: 10px 0 5px;
}

/* Responsive tables */
@media (max-width: 768px) {
    .hvac-certificate-table {
        display: block;
        overflow-x: auto;
    }
    
    .hvac-certificate-filters {
        flex-direction: column;
    }
    
    .hvac-filter-group {
        width: 100%;
    }
}
/* Enhanced certificate filter styles */

/* Enhanced search field styling */
#search_attendee {
    padding-right: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>');
    background-repeat: no-repeat;
    background-position: calc(100% - 8px) center;
    background-size: 16px;
}

/* Search results indicator */
.hvac-search-results {
    background-color: #f0f7ff;
    border-left: 4px solid #2271b1;
    padding: 10px 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
}

.hvac-search-results p {
    margin: 0;
    font-size: 14px;
}

.hvac-search-results strong {
    font-weight: 600;
    color: #2271b1;
}

/* Enhanced attendee info display */
.attendee-info {
    display: flex;
    flex-direction: column;
}

.attendee-name {
    font-weight: 600;
}

.attendee-email {
    font-size: 13px;
    color: #555;
    margin-top: 2px;
}

/* Input hint text */
.hvac-input-hint {
    font-size: 12px;
    color: #666;
    margin-top: 4px;
}

/* Clear filters button */
.hvac-button.hvac-secondary {
    background-color: #f0f0f1;
    color: #2c3338;
    border: 1px solid #c5c5c7;
}

.hvac-button.hvac-secondary:hover {
    background-color: #e0e0e2;
}