/* Test Series Registration Frontend Styles */

.tsrac-form-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tsrac-form-container h2 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 30px;
    font-size: 28px;
    font-weight: 700;
}

.tsrac-form-container h3 {
    color: #0056b3;
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 600;
    border-bottom: 2px solid #e6f2ff;
    padding-bottom: 10px;
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background-color: #f8fbff;
    border-radius: 8px;
    border-left: 4px solid #0056b3;
}

/* Form Layout */
#tsrac-registration-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

/* Labels */
label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

/* Form Controls */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
select,
input[type="file"] {
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
select:focus,
input[type="file"]:focus {
    border-color: #0056b3;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* Select Styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23555' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* File Input */
input[type="file"] {
    padding: 10px;
    border-style: dashed;
}

/* Form Help Text */
.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

/* Payment Section */
#payment_section {
    background-color: #fff8e1;
    border-left-color: #ff9800;
}

#qr_code_container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e1e8ed;
}

#fee_display {
    font-size: 20px;
    font-weight: bold;
    color: #0056b3;
    margin-bottom: 15px;
}

#qr_code_display img {
    max-width: 250px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
}

/* Submit Button */
.submit-button {
    background: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-button:hover {
    background: linear-gradient(135deg, #004494 0%, #003366 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.3);
}

.submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Spinner */
.spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Snackbar */
.tsrac-snackbar {
    visibility: hidden;
    min-width: 300px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    z-index: 9999;
    left: 50%;
    top: 30px;
    transform: translateX(-50%);
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s, top 0.3s;
}

.tsrac-snackbar.show {
    visibility: visible;
    opacity: 1;
    top: 30px;
}

.tsrac-snackbar.success {
    background-color: #4CAF50;
}

.tsrac-snackbar.error {
    background-color: #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tsrac-form-container {
        margin: 10px;
        padding: 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .tsrac-form-container h2 {
        font-size: 24px;
    }
    
    .tsrac-form-container h3 {
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .tsrac-form-container {
        margin: 5px;
        padding: 15px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    select,
    input[type="file"] {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

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

/* Success State */
.form-success {
    background-color: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

/* Error State */
.form-error {
    background-color: #ffebee;
    border-color: #f44336;
    color: #c62828;
}
