/**
 * Event Registration System - Frontend Styles
 */

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

/* Form Sections */
.ers-form-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ers-form-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 20px;
    color: #23282d;
    border-bottom: 2px solid #0073aa;
    padding-bottom: 10px;
}

/* Form Groups */
.ers-form-group {
    margin-bottom: 20px;
}

.ers-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #23282d;
}

.ers-form-group input[type="text"],
.ers-form-group input[type="email"],
.ers-form-group input[type="tel"],
.ers-form-group input[type="number"],
.ers-form-group input[type="date"],
.ers-form-group input[type="file"],
.ers-form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.ers-form-group input:focus,
.ers-form-group select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.ers-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

/* Event Details */
.ers-event-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.ers-price-info {
    font-size: 16px;
}

.ers-price-info strong {
    color: #23282d;
}

.ers-price-info span {
    color: #0073aa;
    font-weight: 600;
}

#ers-discount-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

.ers-discount-label {
    color: #46b450 !important;
}

#ers-discount-amount {
    color: #46b450 !important;
}

#ers-final-price {
    font-size: 18px;
}

/* CAPTCHA */
.ers-captcha-group .ers-captcha-question {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

.ers-refresh-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.ers-refresh-btn:hover {
    background: #005177;
}

.ers-refresh-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

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

.ers-submit-btn {
    padding: 15px 40px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.ers-submit-btn:hover {
    background: #005177;
    transform: translateY(-2px);
}

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

.ers-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Messages */
.ers-form-messages {
    margin-bottom: 20px;
}

.ers-message {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 15px;
}

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

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

/* Loading State */
.ers-loading {
    text-align: center;
    padding: 40px;
}

.ers-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.ers-loading p {
    color: #666;
    font-size: 16px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .ers-registration-form-wrapper {
        padding: 10px;
    }
    
    .ers-form-section {
        padding: 20px 15px;
    }
    
    .ers-form-section h3 {
        font-size: 18px;
    }
    
    .ers-captcha-group .ers-captcha-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ers-submit-btn {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
}

/* Required Field Indicator */
.ers-form-group label::after {
    content: none;
}

.ers-form-group label:has(+ input[required])::after,
.ers-form-group label:has(+ select[required])::after {
    content: " *";
    color: #dc3232;
}

/* File Input Styling */
.ers-form-group input[type="file"] {
    padding: 10px;
    cursor: pointer;
}

.ers-form-group input[type="file"]::-webkit-file-upload-button {
    padding: 8px 15px;
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.ers-form-group input[type="file"]::-webkit-file-upload-button:hover {
    background: #005177;
}

