/**
 * TAQMIR Registration Form Styles
 * Custom styling for registration forms with AJAX and Sweet Alert
 */

/* Form Container */
.registration-form {
    background: #ffffff;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.registration-form h2 {
    color: #2E8B57;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Form Labels */
.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.form-label .text-danger {
    color: #dc3545 !important;
}

/* Form Controls */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #fafafa;
}

.form-control:focus {
    border-color: #2E8B57;
    box-shadow: 0 0 0 0.2rem rgba(46, 139, 87, 0.25);
    background-color: #ffffff;
}

.form-control:hover {
    border-color: #2E8B57;
    background-color: #ffffff;
}

/* Textarea specific */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Submit Button */
.btn-islamic {
    background: linear-gradient(45deg, #2E8B57, #228B22);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(46, 139, 87, 0.3);
}

.btn-islamic:hover {
    background: linear-gradient(45deg, #228B22, #1e7e1e);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 139, 87, 0.4);
}

.btn-islamic:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(46, 139, 87, 0.3);
}

/* Loading States */
.imm-registration-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.imm-registration-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2E8B57;
    border-radius: 50%;
    animation: imm-spin 1s linear infinite;
    z-index: 1000;
}

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

/* Error States */
.imm-field-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
    background-color: #fff5f5 !important;
}

.imm-error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    font-weight: 500;
}

/* Success States */
.imm-field-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
    background-color: #f8fff9 !important;
}

/* Form Validation */
.needs-validation .form-control:invalid {
    border-color: #dc3545;
}

.needs-validation .form-control:valid {
    border-color: #28a745;
}

/* Sweet Alert Customization */
.swal2-popup {
    border-radius: 15px !important;
    font-family: 'Poppins', sans-serif !important;
}

.swal2-title {
    color: #2c3e50 !important;
    font-weight: 700 !important;
}

.swal2-confirm {
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 0.75rem 2rem !important;
}

.swal2-success {
    border-color: #2E8B57 !important;
}

.swal2-success [class^=swal2-success-line] {
    background-color: #2E8B57 !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .registration-form {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .btn-islamic {
        width: 100%;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .form-control {
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 576px) {
    .registration-form {
        padding: 1.5rem 1rem;
        margin: 0.5rem;
    }
    
    .registration-form h2 {
        font-size: 1.5rem;
    }
}

/* Form Section Spacing */
.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

/* Helper Text */
.text-muted {
    color: #6c757d !important;
    font-size: 0.875rem;
}

.small {
    font-size: 0.875rem;
}

/* Internal Links */
.internal-link {
    color: #2E8B57;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.internal-link:hover {
    color: #228B22;
    text-decoration: underline;
}

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

/* Required Field Indicator */
.text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

/* Form Focus States */
.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: #2E8B57;
    box-shadow: 0 0 0 0.2rem rgba(46, 139, 87, 0.25);
}

/* Disabled State */
.btn-islamic:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-islamic:disabled:hover {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Animation for form elements */
.form-control,
.btn-islamic {
    transition: all 0.3s ease;
}

/* Print Styles */
@media print {
    .registration-form {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn-islamic {
        display: none;
    }
}
