/* ============================================
   Registration Form Custom Styles
   ============================================ */

:root {
    --primary-green: #2d8659;
    --secondary-green: #4a7c59;
    --primary-blue: #3b82f6;
    --light-gray: #f5f5f5;
    --text-light: #666666;
}

/* Form Container */
.registration-container {
    min-height: calc(100vh - 200px);
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    padding: 2rem 0;
}

.registration-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    border: none;
    overflow: hidden;
}

.registration-body {
    padding: 2.5rem;
}

/* Section Headers */
.section-header {
    color: var(--primary-green);
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.section-header i {
    font-size: 1.25rem;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.5rem;
}

.form-label .required {
    color: #dc3545;
    margin-left: 0.25rem;
}

.form-control:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(45, 134, 89, 0.25);
}

/* Toggle Switches */
.form-check-input:checked {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
}

.form-check-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.25rem rgba(45, 134,89, 0.25);
}

.form-check-label {
    font-weight: 500;
    color: #333;
    margin-left: 0.5rem;
}

/* Conditional Fields */
.conditional-field {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.conditional-field.show {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation Feedback */
.is-invalid {
    border-color: #dc3545;
}

.is-valid {
    border-color: #28a745;
}

/* Hide all invalid feedback by default - override Bootstrap */
.invalid-feedback {
    display: none !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    color: #dc3545;
    width: 100%;
}

/* Show invalid feedback only when input is invalid and form is validated */
.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .invalid-feedback,
.was-validated .form-control:invalid ~ .form-text ~ .invalid-feedback,
.was-validated .form-select:invalid ~ .form-text ~ .invalid-feedback,
.form-control.is-invalid ~ .invalid-feedback,
.form-select.is-invalid ~ .invalid-feedback,
.form-control.is-invalid ~ .form-text ~ .invalid-feedback,
.form-select.is-invalid ~ .form-text ~ .invalid-feedback {
    display: block !important;
}

/* Ensure form doesn't show errors on initial load */
#registrationForm:not(.was-validated) .invalid-feedback {
    display: none !important;
}

/* Buttons */
.btn-submit {
    background-color: var(--primary-green);
    border: none;
    color: white;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 134, 89, 0.3);
}

.btn-submit:hover {
    background-color: #23704a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.4);
    color: white;
}

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

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Responsive Design */
@media (max-width: 768px) {
    .registration-container {
        padding: 1rem 0;
    }
    
    .registration-body {
        padding: 1.5rem;
    }
    
    .registration-header {
        padding: 1.5rem;
    }
    
    .registration-header h1 {
        font-size: 1.5rem;
    }
    
    .section-header {
        font-size: 1.25rem;
    }
    
    .btn-submit {
        width: 100%;
        padding: 0.875rem 1.5rem;
    }
}

/* Form Row Spacing */
.row {
    margin-bottom: 0;
}

.row > [class*="col-"] {
    margin-bottom: 1rem;
}

/* Select Dropdown Styling */
.form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 0.2rem rgba(45, 134, 89, 0.25);
}

/* Help Text */
.form-text {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Back Link */
.back-link {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #23704a;
    text-decoration: underline;
}

