/**
 * File: assets/css/public.css
 * Public-facing styles
 */

/* Registration Wrapper */
.erm-registration-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Capacity Display */
.erm-capacity-display {
    background: #f0f6fc;
    border: 2px solid #2271b1;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    text-align: center;
}

.erm-capacity-text {
    font-size: 18px;
    color: #1d2327;
    margin: 0;
    font-weight: 500;
}

.erm-capacity-text strong {
    color: #2271b1;
    font-weight: 700;
    font-size: 22px;
}

#sdrr-capacity-timestamp {
    font-size: 14px;
    color: #666;
}

/* Full Notice */
.erm-full-notice {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
}

.erm-full-notice h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #856404;
    font-size: 24px;
}

.erm-full-notice p {
    margin: 0;
    color: #856404;
    font-size: 16px;
    line-height: 1.6;
}

/* Status Notices */
.erm-status-notice {
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 30px;
    text-align: center;
}

.erm-status-notice h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 28px;
}

.erm-status-notice p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.6;
}

.erm-status-notice.erm-before-open {
    background: #e7f3ff;
    border: 2px solid #2271b1;
}

.erm-status-notice.erm-before-open h3 {
    color: #135e96;
}

.erm-status-notice.erm-before-open p {
    color: #1d2327;
}

.erm-status-notice.erm-closed {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.erm-status-notice.erm-closed h3 {
    color: #721c24;
}

.erm-status-notice.erm-closed p {
    color: #721c24;
}

/* Countdown Timer */
#sdrr-countdown {
    font-family: 'Courier New', monospace;
    background: rgba(255,255,255,0.5);
    padding: 15px 30px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 20px;
}

/* Form Styles */
.erm-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.erm-form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.erm-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 30px;
}

.erm-form-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 22px;
    color: #1d2327;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #2271b1;
}

/* Form Fields */
.erm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.erm-form-field {
    margin-bottom: 20px;
}

.erm-form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1d2327;
    font-size: 15px;
}

.erm-form-field input[type="text"],
.erm-form-field input[type="email"],
.erm-form-field input[type="tel"],
.erm-form-field input[type="number"],
.erm-form-field select,
.erm-form-field textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
}

.erm-form-field input[type="text"]:focus,
.erm-form-field input[type="email"]:focus,
.erm-form-field input[type="tel"]:focus,
.erm-form-field input[type="number"]:focus,
.erm-form-field select:focus,
.erm-form-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.erm-form-field textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

.erm-form-field select {
    cursor: pointer;
    background-image: url('data:image/svg+xml;charset=UTF-8,%3csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"%3e%3cpolyline points="6 9 12 15 18 9"%3e%3c/polyline%3e%3c/svg%3e');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.required {
    color: #dc3232;
    font-weight: bold;
}

/* Field Description */
.erm-field-description {
    margin-top: 5px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Custom Fields */
.erm-custom-fields {
    margin-top: 30px;
}

.erm-custom-fields h4 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    color: #1d2327;
    font-weight: 600;
}

.erm-form-field input[type="checkbox"],
.erm-form-field input[type="radio"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.erm-form-field label input[type="checkbox"],
.erm-form-field label input[type="radio"] {
    margin-right: 8px;
}

/* Checkbox Label */
.erm-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal !important;
}

.erm-checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    flex-shrink: 0;
}

/* Waiver Section */
.erm-waiver-text {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-left: 4px solid #2271b1;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.8;
    color: #3c434a;
    max-height: 300px;
    overflow-y: auto;
}

.erm-waiver-text p {
    margin: 0 0 15px 0;
}

.erm-waiver-text p:last-child {
    margin-bottom: 0;
}

/* Form Actions */
.erm-form-actions {
    margin-top: 30px;
    text-align: center;
}

.erm-submit-btn {
    background: #2271b1;
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    display: inline-block;
    min-width: 250px;
}

.erm-submit-btn:hover {
    background: #135e96;
    transform: translateY(-1px);
}

.erm-submit-btn:active {
    transform: translateY(0);
}

.erm-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: inline-block;
}

/* Messages */
#sdrr-form-messages {
    margin-top: 20px;
}

.erm-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 15px;
    line-height: 1.6;
}

.erm-message.erm-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.erm-message.erm-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.erm-message.erm-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
}

.erm-message.erm-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

/* Roster Styles */
.erm-roster {
    max-width: 1000px;
    margin: 0 auto;
}

.erm-roster h3 {
    font-size: 28px;
    color: #1d2327;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #2271b1;
}

.erm-roster-class {
    margin-bottom: 40px;
}

.erm-roster-entry {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.erm-roster-entry:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.erm-roster-entry h4 {
    margin: 0 0 10px 0;
    font-size: 22px;
    color: #2271b1;
    font-weight: 600;
}

.musher-bio {
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #3c434a;
}

.musher-location {
    margin: 5px 0 0 0;
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Capacity Counter Shortcode */
.erm-capacity-counter {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.erm-capacity-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.erm-stat {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.stat-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    display: block;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* Payment Message */
.erm-payment-message {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px 30px;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
}

.erm-payment-message.erm-success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.erm-payment-message.erm-error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .erm-registration-wrapper {
        padding: 15px;
    }
    
    .erm-form {
        padding: 20px;
    }
    
    .erm-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .erm-form-section h3 {
        font-size: 20px;
    }
    
    .erm-capacity-display {
        padding: 15px;
    }
    
    .erm-capacity-text {
        font-size: 16px;
    }
    
    .erm-capacity-text strong {
        font-size: 20px;
    }
    
    .erm-submit-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .erm-capacity-stats {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .erm-roster-entry h4 {
        font-size: 20px;
    }
}

@media screen and (max-width: 480px) {
    .erm-form-section {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
    
    .erm-form-field {
        margin-bottom: 15px;
    }
    
    .erm-form-field label {
        font-size: 14px;
    }
    
    .erm-form-field input[type="text"],
    .erm-form-field input[type="email"],
    .erm-form-field input[type="tel"],
    .erm-form-field input[type="number"],
    .erm-form-field select,
    .erm-form-field textarea {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .erm-waiver-text {
        padding: 15px;
        font-size: 13px;
    }
}

/* Accessibility */
.erm-form-field input:focus,
.erm-form-field select:focus,
.erm-form-field textarea:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

.erm-submit-btn:focus {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Loading State */
.erm-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.erm-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: sdrr-spin 1s linear infinite;
}

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

/* Print Styles */
@media print {
    .erm-capacity-display,
    .erm-full-notice,
    .erm-form-actions,
    .erm-submit-btn {
        display: none !important;
    }
    
    .erm-form {
        border: none;
        box-shadow: none;
    }
}

/* Character Counter */
#bio-char-count {
    font-weight: 600;
    color: #2271b1;
}

/* Custom Select Arrow for better cross-browser support */
select::-ms-expand {
    display: none;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Form Validation Styles */
.erm-form-field input:invalid:not(:placeholder-shown),
.erm-form-field select:invalid:not(:placeholder-shown),
.erm-form-field textarea:invalid:not(:placeholder-shown) {
    border-color: #dc3232;
}

.erm-form-field input:valid:not(:placeholder-shown),
.erm-form-field select:valid:not(:placeholder-shown),
.erm-form-field textarea:valid:not(:placeholder-shown) {
    border-color: #46b450;
}

/* Radio and Checkbox Groups */
.erm-form-field input[type="radio"] + label,
.erm-form-field input[type="checkbox"] + label {
    display: inline-block;
    margin-left: 5px;
    font-weight: normal;
}

/* Age Radio Group Styling */
.erm-radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.erm-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #f9f9f9;
    transition: all 0.2s ease;
}

.erm-radio-label:hover {
    border-color: #2271b1;
    background: #f0f6fc;
}

.erm-radio-label input[type="radio"] {
    margin: 0;
    cursor: pointer;
}

.erm-radio-label input[type="radio"]:checked {
    accent-color: #2271b1;
}

.erm-radio-label:has(input[type="radio"]:checked) {
    border-color: #2271b1;
    background: #f0f6fc;
    font-weight: 600;
}

/* File: assets/css/public.css - ADD THESE STYLES TO THE EXISTING FILE */

/* PayPal Payment Container */
.erm-payment-container {
    background: #fff;
    border: 2px solid #2271b1;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.erm-payment-container h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 24px;
    color: #1d2327;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.erm-payment-summary {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.erm-payment-summary p {
    margin: 10px 0;
    font-size: 16px;
    color: #1d2327;
}

.erm-payment-summary p strong {
    font-size: 20px;
    color: #2271b1;
}

.erm-payment-summary .description {
    font-size: 14px;
    color: #666;
    font-style: italic;
    margin-top: 15px;
}

/* PayPal Button Container */
#paypal-button-container {
    margin: 25px 0;
    min-height: 50px;
}

#paypal-payment-messages {
    margin: 20px 0;
}

/* Cancel Payment Button */
.erm-cancel-btn {
    background: #f0f0f0;
    color: #666;
    border: 1px solid #ddd;
    padding: 12px 30px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 20px auto 0 auto;
    width: 100%;
    max-width: 300px;
}

.erm-cancel-btn:hover {
    background: #e5e5e5;
    border-color: #ccc;
    color: #333;
}

/* Payment Success Message Enhancement */
.erm-message h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 22px;
}

.erm-message.erm-success h3 {
    color: #155724;
}

.erm-message.erm-error h3 {
    color: #721c24;
}

/* Loading Animation for Payment Processing */
.erm-payment-processing {
    text-align: center;
    padding: 40px 20px;
}

.erm-payment-processing::before {
    content: '';
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    animation: sdrr-spin 1s linear infinite;
    margin-bottom: 15px;
}

/* Payment Gateway Icons/Indicators */
.erm-payment-gateway-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    color: #666;
    margin-bottom: 15px;
}

.erm-payment-gateway-indicator::before {
    content: '🔒';
    font-size: 16px;
}

/* Secure Payment Badge */
.erm-secure-badge {
    text-align: center;
    padding: 15px;
    background: #e7f7ed;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    margin-top: 20px;
    font-size: 13px;
    color: #155724;
}

.erm-secure-badge::before {
    content: '🔒';
    margin-right: 5px;
}

/* Payment Step Indicators */
.erm-payment-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding: 0 20px;
}

.erm-payment-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding-top: 35px;
}

.erm-payment-step::before {
    content: attr(data-step);
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 30px;
    line-height: 30px;
    background: #ddd;
    color: #666;
    border-radius: 50%;
    font-weight: 600;
    font-size: 14px;
}

.erm-payment-step.active::before {
    background: #2271b1;
    color: #fff;
}

.erm-payment-step.completed::before {
    content: '✓';
    background: #46b450;
    color: #fff;
}

.erm-payment-step-label {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

.erm-payment-step.active .erm-payment-step-label {
    color: #2271b1;
    font-weight: 600;
}

/* Responsive adjustments for payment container */
@media screen and (max-width: 768px) {
    .erm-payment-container {
        padding: 20px;
        margin: 20px 0;
    }
    
    .erm-payment-container h3 {
        font-size: 20px;
    }
    
    .erm-payment-summary {
        padding: 15px;
    }
    
    .erm-payment-summary p strong {
        font-size: 18px;
    }
    
    .erm-payment-steps {
        flex-direction: column;
        gap: 15px;
        padding: 0;
    }
    
    .erm-payment-step {
        padding-top: 0;
        padding-left: 45px;
        text-align: left;
    }
    
    .erm-payment-step::before {
        left: 0;
        transform: none;
    }
}

/* Error state styling */
.has-error input,
.has-error select,
.has-error textarea {
    border-color: #dc3232 !important;
    box-shadow: 0 0 0 1px rgba(220, 50, 50, 0.2) !important;
}

/* Success state for completed payment */
.erm-payment-complete {
    background: #d4edda;
    border: 2px solid #28a745;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.erm-payment-complete h3 {
    color: #155724;
    margin-top: 0;
}

.erm-payment-complete p {
    color: #155724;
    font-size: 16px;
    line-height: 1.6;
    margin: 10px 0;
}

/* PayPal SDK loading state */
.erm-paypal-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.erm-paypal-loading::before {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0070ba;
    border-radius: 50%;
    animation: sdrr-spin 1s linear infinite;
    margin-bottom: 10px;
}

/* Payment method selector (if multiple methods available) */
.erm-payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.erm-payment-method {
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.erm-payment-method:hover {
    border-color: #2271b1;
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.2);
}

.erm-payment-method.selected {
    border-color: #2271b1;
    background: #f0f6fc;
}

.erm-payment-method-icon {
    font-size: 36px;
    margin-bottom: 10px;
}

.erm-payment-method-name {
    font-weight: 600;
    color: #1d2327;
    font-size: 14px;
}

/* Payment error specific styling */
#paypal-payment-messages .erm-message.erm-error {
    animation: sdrr-shake 0.5s;
}

@keyframes sdrr-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Transaction details display */
.erm-transaction-details {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-top: 15px;
    font-size: 13px;
}

.erm-transaction-detail {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e5e5;
}

.erm-transaction-detail:last-child {
    border-bottom: none;
}

.erm-transaction-label {
    color: #666;
    font-weight: 500;
}

.erm-transaction-value {
    color: #1d2327;
    font-weight: 600;
}

/* Print styles for payment receipt */
@media print {
    .erm-payment-container {
        border: 1px solid #000;
        box-shadow: none;
    }
    
    #paypal-button-container,
    .erm-cancel-btn {
        display: none !important;
    }
    
    .erm-payment-complete {
        page-break-inside: avoid;
    }
}

/* Force PayPal payment container to be visible */
#sdrr-paypal-payment-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 9999 !important;
    background: #fff !important;
    padding: 20px !important;
    margin: 20px 0 !important;
}

/* Waitlist Styles */
.erm-waitlist {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.erm-waitlist h2 {
    font-size: 32px;
    color: #1d2327;
    margin: 0 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #ffc107;
}

.waitlist-description {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin-bottom: 30px;
    border-radius: 4px;
    color: #856404;
    font-size: 15px;
    line-height: 1.6;
}

.erm-waitlist h3 {
    font-size: 24px;
    color: #1d2327;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffc107;
}

.erm-waitlist-class {
    margin-bottom: 40px;
}

.waitlist-entries {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: waitlist-counter;
}

.waitlist-entry {
    background: #fff;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    counter-increment: waitlist-counter;
    position: relative;
    padding-left: 60px;
}

.waitlist-entry::before {
    content: counter(waitlist-counter);
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 35px;
    height: 35px;
    line-height: 35px;
    background: #ffc107;
    color: #856404;
    border-radius: 50%;
    text-align: center;
    font-weight: 700;
    font-size: 16px;
}

.waitlist-entry:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #f0ad4e;
}

.waitlist-entry strong {
    font-size: 18px;
    color: #1d2327;
    font-weight: 600;
}

.waitlist-date {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.registration-date {
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #666;
}

.registration-date small {
    font-style: italic;
}

/* Responsive Waitlist Styles */
@media screen and (max-width: 768px) {
    .erm-waitlist {
        padding: 15px;
    }
    
    .erm-waitlist h2 {
        font-size: 26px;
    }
    
    .erm-waitlist h3 {
        font-size: 20px;
    }
    
    .waitlist-entry {
        padding: 12px 15px 12px 50px;
    }
    
    .waitlist-entry::before {
        width: 30px;
        height: 30px;
        line-height: 30px;
        font-size: 14px;
        left: 10px;
    }
    
    .waitlist-entry strong {
        font-size: 16px;
        display: block;
        margin-bottom: 5px;
    }
}

/* Print Styles for Waitlist */
@media print {
    .erm-waitlist {
        padding: 0;
    }
    
    .waitlist-entry {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #999;
    }
    
    .waitlist-entry:hover {
        transform: none;
    }
}

/* Race Results Styles */
.erm-race-results {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px 0;
}

.erm-no-results {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 40px;
    text-align: center;
    margin: 30px 0;
}

.erm-no-results p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

.erm-results-year {
    margin-bottom: 60px;
}

.erm-results-year-header {
    font-size: 36px;
    color: #1d2327;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 4px solid #2271b1;
    text-align: center;
    font-weight: 700;
}

.erm-results-class {
    margin-bottom: 50px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.erm-results-class-header {
    font-size: 26px;
    color: #2271b1;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    font-weight: 600;
}

.erm-results-table-wrapper {
    overflow-x: auto;
    margin-top: 15px;
    -webkit-overflow-scrolling: touch;
}

.erm-results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    font-size: 1.4rem;
    table-layout: fixed;
}

.erm-results-table thead {
    background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
    color: #fff;
}

.erm-results-table th {
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    font-size: 1.3rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.erm-results-table th.col-place {
    width: 8%;
    text-align: center;
}

.erm-results-table th.col-bib {
    width: 5%;
    text-align: center;
}

.erm-results-table th.col-musher {
    width: 24%;
}

.erm-results-table th.col-time {
    width: 21%;
    text-align: right;
    white-space: nowrap;
}

.erm-results-table tbody tr {
    border-bottom: 1px solid #e5e5e5;
    transition: background-color 0.2s ease;
}

.erm-results-table tbody tr:hover {
    background-color: #f0f6fc;
}

.erm-results-table tbody tr:last-child {
    border-bottom: none;
}

.erm-results-table td {
    padding: 6px 6px;
    color: #1d2327;
}

.erm-results-table td.col-place {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    font-size: 1.4rem;
    color: #2271b1;
}

.erm-results-table td.col-bib {
    text-align: center;
    font-weight: 500;
    color: #666;
    font-size: 13px;
    font-size: 1.3rem;
}

.erm-results-table td.col-musher {
    font-weight: 600;
    font-size: 14px;
    font-size: 1.4rem;
}

.erm-results-table td.col-time {
    text-align: right;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-size: 1.3rem;
    color: #3c434a;
    white-space: nowrap;
}

.erm-results-table td.col-overall {
    font-weight: 700;
    font-size: 14px;
    font-size: 1.4rem;
    color: #2271b1;
    white-space: nowrap;
}

/* Highlight first three places */
.erm-results-table tbody tr:nth-child(1) td.col-place {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    color: #856404;
    border-radius: 3px;
    font-size: 16px;
    font-size: 1.6rem;
}

.erm-results-table tbody tr:nth-child(2) td.col-place {
    background: linear-gradient(135deg, #c0c0c0 0%, #e0e0e0 100%);
    color: #666;
    border-radius: 3px;
    font-size: 16px;
    font-size: 1.6rem;
}

.erm-results-table tbody tr:nth-child(3) td.col-place {
    background: linear-gradient(135deg, #cd7f32 0%, #e89b5f 100%);
    color: #6b4423;
    border-radius: 3px;
    font-size: 16px;
    font-size: 1.6rem;
}

/* Styling for DNR/DNF/WD status values */
.erm-results-table tbody tr:has(td.col-overall:is([data-status="DNR"], [data-status="DNF"], [data-status="WD"])) {
    opacity: 0.7;
}

.erm-results-table td.col-time {
    position: relative;
}

/* Add visual indicator for non-finishers */
.erm-results-table tbody tr:has(td:contains("DNF")) td.col-place,
.erm-results-table tbody tr:has(td:contains("DNR")) td.col-place,
.erm-results-table tbody tr:has(td:contains("WD")) td.col-place {
    background: #f8d7da;
    color: #721c24;
    font-weight: 600;
}

/* Zebra striping for better readability */
.erm-results-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.erm-results-table tbody tr:nth-child(even):hover {
    background-color: #f0f6fc;
}

/* Responsive Design for Results */
@media screen and (max-width: 992px) {
    .erm-results-year-header {
        font-size: 30px;
    }
    
    .erm-results-class-header {
        font-size: 22px;
    }
    
    .erm-results-table {
        font-size: 14px;
    }
    
    .erm-results-table th,
    .erm-results-table td {
        padding: 10px 8px;
    }
}

@media screen and (max-width: 768px) {
    .erm-race-results {
        padding: 15px;
    }
    
    .erm-results-class {
        padding: 15px;
    }
    
    .erm-results-year-header {
        font-size: 26px;
    }
    
    .erm-results-class-header {
        font-size: 20px;
    }
    
    /* Stack table for mobile - card layout */
    .erm-results-table {
        display: block;
    }
    
    .erm-results-table thead {
        display: none;
    }
    
    .erm-results-table tbody {
        display: block;
    }
    
    .erm-results-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
    }
    
    .erm-results-table tr:hover {
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .erm-results-table td {
        display: grid;
        grid-template-columns: 100px 1fr;
        padding: 8px 0;
        text-align: left !important;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .erm-results-table td:last-child {
        border-bottom: none;
    }
    
    .erm-results-table td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #666;
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }
    
    .erm-results-table td.col-place {
        font-size: 20px;
        padding: 12px 0;
    }
    
    .erm-results-table td.col-place::before {
        content: 'Place';
    }
    
    .erm-results-table td.col-bib::before {
        content: 'Bib';
    }
    
    .erm-results-table td.col-musher {
        font-size: 18px;
        padding: 12px 0;
    }
    
    .erm-results-table td.col-musher::before {
        content: 'Musher';
    }
    
    .erm-results-table td.col-time::before {
        content: attr(data-day);
    }
    
    .erm-results-table tbody tr:nth-child(even) {
        background-color: #fff;
    }
}

/* Print Styles for Race Results */
@media print {
    .erm-race-results {
        padding: 0;
    }
    
    .erm-results-year {
        page-break-after: always;
    }
    
    .erm-results-class {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #999;
        margin-bottom: 30px;
    }
    
    .erm-results-table {
        font-size: 11px;
    }
    
    .erm-results-table thead {
        background: #333 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .erm-results-table tbody tr:hover {
        background-color: transparent !important;
    }
    
    .erm-results-table tbody tr:nth-child(1) td.col-place,
    .erm-results-table tbody tr:nth-child(2) td.col-place,
    .erm-results-table tbody tr:nth-child(3) td.col-place {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Accessibility improvements for results */
.erm-results-table:focus-within {
    outline: 2px solid #2271b1;
    outline-offset: 4px;
}

.erm-results-table tbody tr:focus-within {
    background-color: #f0f6fc;
    outline: 2px solid #2271b1;
}

/* Loading state for results */
.erm-race-results.loading {
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.erm-race-results.loading::before {
    content: 'Loading results...';
    font-size: 18px;
    color: #666;
}
