/**
 * Frontend Styles
 * Main stylesheet for the student registration form
 */

/* Reset and Base Styles */
.srf-form-wrapper {
    font-family: 'Cairo', 'Arial', sans-serif;
    direction: rtl;
    text-align: right;
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.srf-form-wrapper * {
    box-sizing: border-box;
}

/* Form Container */
.srf-form-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form Header */
.srf-form-header {
    text-align: center;
    margin-bottom: 40px;
}

.srf-form-title {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 10px 0;
}

.srf-form-subtitle {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
}

/* Progress Steps */
.srf-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 20px;
}

.srf-progress-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    right: 20px;
    left: 20px;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.srf-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    transition: all 0.3s ease;
}

.srf-step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.srf-step-label {
    font-size: 13px;
    color: #999;
    text-align: center;
    max-width: 120px;
    transition: all 0.3s ease;
}

.srf-step.active .srf-step-number,
.srf-step.completed .srf-step-number {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.srf-step.active .srf-step-label,
.srf-step.completed .srf-step-label {
    color: #2c3e50;
    font-weight: 600;
}

/* Wizard Steps */
.srf-wizard-step {
    display: none;
    animation: slideIn 0.4s ease-in-out;
}

.srf-wizard-step.active {
    display: block;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.srf-step-title {
    font-size: 24px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 30px 0;
    padding-bottom: 15px;
    border-bottom: 3px solid #667eea;
}

/* Form Groups */
.srf-form-group {
    margin-bottom: 25px;
}

.srf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.srf-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #34495e;
    margin-bottom: 8px;
}

.required {
    color: #e74c3c;
}

/* Form Inputs */
.srf-input,
.srf-select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
    color: #2c3e50;
    transition: all 0.3s ease;
}

.srf-input:focus,
.srf-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.srf-input.error,
.srf-select.error {
    border-color: #e74c3c;
}

.srf-error {
    display: block;
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    min-height: 20px;
}

/* Checkbox Grid */
.srf-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.srf-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.srf-checkbox-label:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.srf-checkbox-label input[type="checkbox"] {
    margin-left: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.srf-checkbox-label input[type="checkbox"]:checked + span {
    color: #667eea;
    font-weight: 600;
}

/* Student Cards */
.srf-students-container {
    margin-bottom: 20px;
}

.srf-student-card {
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.srf-student-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.srf-student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
}

.srf-student-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.srf-remove-student {
    background: #e74c3c;
    color: #fff;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.srf-remove-student:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.srf-remove-student .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Buttons */
.srf-btn {
    padding: 14px 30px;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.srf-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.srf-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.srf-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.srf-btn-secondary {
    background: #6c757d;
    color: #fff;
}

.srf-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.srf-btn-success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e063 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(86, 171, 47, 0.4);
}

.srf-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(86, 171, 47, 0.5);
}

.srf-btn-add-student {
    width: 100%;
    background: #fff;
    color: #667eea;
    border: 2px dashed #667eea;
    margin-bottom: 30px;
}

.srf-btn-add-student:hover {
    background: #667eea;
    color: #fff;
    border-style: solid;
}

.srf-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Step Actions */
.srf-step-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 40px;
}

/* Review Section */
.srf-review-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 25px;
}

.srf-review-section h4 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.srf-review-item {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
}

.srf-review-item:last-child {
    border-bottom: none;
}

.srf-review-label {
    font-weight: 600;
    color: #495057;
    min-width: 180px;
}

.srf-review-value {
    color: #2c3e50;
    flex: 1;
}

.srf-review-student {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-right: 4px solid #667eea;
}

.srf-review-student:last-child {
    margin-bottom: 0;
}

.srf-review-student h5 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 15px 0;
}

/* Form Messages */
.srf-form-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
}

.srf-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.srf-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

/* Loading State */
.srf-loading {
    text-align: center;
    padding: 20px;
}

.srf-loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .srf-form-container {
        padding: 25px;
    }
    
    .srf-form-title {
        font-size: 24px;
    }
    
    .srf-progress-steps {
        padding: 0;
    }
    
    .srf-step-label {
        font-size: 11px;
        max-width: 80px;
    }
    
    .srf-step-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .srf-form-row {
        grid-template-columns: 1fr;
    }
    
    .srf-checkbox-grid {
        grid-template-columns: 1fr;
    }
    
    .srf-step-actions {
        flex-direction: column-reverse;
    }
    
    .srf-btn {
        width: 100%;
        justify-content: center;
    }
    
    .srf-review-item {
        flex-direction: column;
        gap: 5px;
    }
    
    .srf-review-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .srf-form-wrapper {
        padding: 10px;
    }
    
    .srf-form-container {
        padding: 20px;
    }
    
    .srf-form-title {
        font-size: 20px;
    }
    
    .srf-step-label {
        display: none;
    }
}

