/**
 * Certificate Admin Styles
 * 
 * Styles for the certificate management pages.
 */

/* Certificate preview container */
.hvac-certificate-preview {
    border: 1px solid #ddd;
    background-color: #f9f9f9;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.hvac-certificate-preview img {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Certificate settings form */
.hvac-certificate-settings {
    max-width: 800px;
    margin-bottom: 30px;
}

.hvac-certificate-settings .form-table th {
    width: 200px;
}

.hvac-certificate-settings .color-picker {
    width: 80px;
}

.hvac-certificate-placeholder-list {
    background: #f5f5f5;
    padding: 10px 15px;
    border-left: 4px solid #0074be;
    margin-bottom: 20px;
}

.hvac-certificate-placeholder-list code {
    margin-right: 10px;
    background: #fff;
    padding: 2px 4px;
}

/* Certificate generation button */
.hvac-generate-certificate-btn {
    background-color: #0074be;
    color: #fff;
    border: none;
    padding: 10px 15px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 3px;
}

.hvac-generate-certificate-btn:hover {
    background-color: #005fa0;
}

/* Certificate statistics */
.hvac-certificate-stats {
    display: flex;
    margin-bottom: 20px;
}

.hvac-certificate-stat-box {
    flex: 1;
    padding: 15px;
    margin-right: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid;
    text-align: center;
}

.hvac-certificate-stat-box:last-child {
    margin-right: 0;
}

.hvac-certificate-stat-box.active {
    border-left-color: #46b450;
}

.hvac-certificate-stat-box.revoked {
    border-left-color: #dc3232;
}

.hvac-certificate-stat-box.total {
    border-left-color: #0074be;
}

.hvac-certificate-stat-box h3 {
    margin-top: 0;
    color: #555;
    font-size: 14px;
    text-transform: uppercase;
}

.hvac-certificate-stat-box .stat-number {
    font-size: 24px;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}

/* Certificate table */
.hvac-certificates-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
}

.hvac-certificates-table th,
.hvac-certificates-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.hvac-certificates-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.hvac-certificates-table tr:hover {
    background-color: #f9f9f9;
}

.hvac-certificates-table .status-active,
.hvac-certificates-table .status-revoked {
    padding: 5px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.hvac-certificates-table .status-active {
    background-color: #e7f9e7;
    color: #46b450;
}

.hvac-certificates-table .status-revoked {
    background-color: #f9e7e7;
    color: #dc3232;
}

.hvac-certificates-table .certificate-actions a {
    margin-right: 10px;
}

/* Media Queries */
@media (max-width: 768px) {
    .hvac-certificate-stats {
        flex-direction: column;
    }
    
    .hvac-certificate-stat-box {
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* Focus Management Styles - WCAG 2.1 Compliance */
/* Added for keyboard accessibility and screen reader support */

/* Button Focus Styles */
.hvac-button:focus,
.hvac-content .button:focus,
.hvac-content button:focus,
.hvac-content input[type="submit"]:focus,
.hvac-email-submit:focus,
.hvac-filter-submit:focus,
.hvac-certificate-actions button:focus,
.hvac-certificate-actions a:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.2);
    border-radius: 4px;
}

/* Input Focus Styles */
.hvac-form-input:focus,
.hvac-content input[type="text"]:focus,
.hvac-content input[type="email"]:focus,
.hvac-content input[type="password"]:focus,
.hvac-content input[type="url"]:focus,
.hvac-content textarea:focus,
.hvac-content select:focus,
.hvac-email-form-row input:focus,
.hvac-email-form-row textarea:focus,
.hvac-filter-group input:focus,
.hvac-filter-group select:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    border-color: #005fcc;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.2);
}

/* Link Focus Styles */
.hvac-content a:focus,
.hvac-event-link:focus,
.hvac-certificate-link:focus,
.hvac-attendee-profile-icon:focus,
.hvac-dashboard-nav a:focus,
.hvac-email-navigation a:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    text-decoration: underline;
    background-color: rgba(0, 95, 204, 0.1);
    border-radius: 2px;
}

/* Interactive Element Focus Styles */
.hvac-attendee-checkbox:focus,
.hvac-select-all-container input[type="checkbox"]:focus,
.hvac-modal-close:focus,
.hvac-certificate-table tr:focus {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(0, 95, 204, 0.2);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .hvac-content *:focus {
        outline: 3px solid #000000;
        outline-offset: 2px;
        background-color: #ffff00;
        color: #000000;
    }
}

/* Focus-visible polyfill support */

/* Reset focus for mouse users while preserving keyboard accessibility */
.js-focus-visible :focus:not(.focus-visible) {
    outline: none;
    box-shadow: none;
}

/* Ensure focus is visible for keyboard users */
.js-focus-visible .focus-visible {
    outline: 2px solid #005fcc;
    outline-offset: 2px;
}
