/* Form-specific Styles */

/* Quill Editor RTL Support */
.ql-editor {
    direction: rtl;
    text-align: right;
}

.ql-editor.ltr {
    direction: ltr;
    text-align: left;
}

/* Form Validation */
.form-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* File Upload Areas */
.upload-area {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #007bff;
    background: #f0f8ff;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #f0fff0;
}

/* Multi-step Forms */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.step-indicator {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.step-item {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.step-item.active {
    background: #007bff;
    color: white;
}

.step-item.completed {
    background: #28a745;
    color: white;
}

/* Dynamic Form Fields */
.dynamic-field {
    position: relative;
    margin-bottom: 20px;
}

.remove-field {
    position: absolute;
    top: 5px;
    right: 5px;
    color: #dc3545;
    cursor: pointer;
    z-index: 10;
}

/* Form Groups */
.form-group-inline {
    display: flex;
    gap: 15px;
    align-items: end;
}

.form-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Custom Select Styling */
.custom-select {
    position: relative;
}

.custom-select::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%) translateX(-50%);
    pointer-events: none;
    color: #6c757d;
}

/* Responsive Form Design */
@media (max-width: 768px) {
    .form-group-inline {
        flex-direction: column;
        gap: 10px;
    }
    
    .upload-area {
        padding: 20px;
    }
    
    .step-indicator {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .step-item {
        width: 35px;
        height: 35px;
        margin: 5px;
    }
}

/* RTL Form Adjustments */
[dir="rtl"] .remove-field {
    right: auto;
    left: 5px;
}

[dir="rtl"] .custom-select::after {
    right: auto;
    left: 15px;
}

/* Login Form Styles */
.login-body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    font-family: 'Almarai', sans-serif;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
}

.login-fullscreen-container {
    flex: 1;
    display: flex;
    margin-top: 70px; /* Space for the fixed header */
    height: calc(100vh - 70px);
}

.login-fullscreen-row {
    display: flex;
    width: 100%;
    height: 100%;
}

.login-form-container {
    flex: 2;
    background: white;
    overflow-y: auto;
}

.login-image-container {
    flex: 1;
    display: none; /* Hidden on mobile by default */
}

.login-form-section {
    padding: 3rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    margin: 0 auto;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-title {
    color: #333;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.login-subtitle {
    color: #666;
    font-size: 1rem;
}

.login-form-group {
    margin-bottom: 1.5rem;
}

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

.login-input-group {
    position: relative;
}

.login-input-group-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateX(-50%);
    color: #667eea;
    z-index: 10;
    pointer-events: none;
    font-size: 1.3rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.login-input-group:focus-within .login-input-group-icon {
    opacity: 1;
    z-index: 15;
    color: #667eea;
}

.login-form-control {
    padding: 0.75rem 3.5rem 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.login-form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.password-toggle {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.login-btn2 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    width: auto;
    min-width: 200px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-btn2:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.login-form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password:hover {
    text-decoration: underline;
}

.register-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.register-link a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.register-link a:hover {
    text-decoration: underline;
}

.image-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
    overflow: hidden;
}

.doctor-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.input-hint {
    font-size: 0.875rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.back-to-home {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.back-to-home:hover {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Register Form Styles */
.register-body {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    font-family: 'Almarai', sans-serif;
}

.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    margin-top: 60px;
}

.register-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
}

.register-form-section {
    padding: 2rem;
    max-height: 90vh;
    overflow-y: auto;
}

.register-header {
    text-align: center;
    margin-bottom: 2rem;
}

.register-title {
    color: #333;
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.8rem;
}

.register-subtitle {
    color: #666;
    font-size: 0.9rem;
}

.register-form-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e9ecef;
}

.register-form-section:last-child {
    border-bottom: none;
}

.register-section-title {
    color: #28a745;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #28a745;
    display: inline-block;
    font-size: 1.1rem;
}

.register-form-group {
    margin-bottom: 1.2rem;
}

.register-form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.register-input-group {
    position: relative;
}

.register-input-group-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    z-index: 10;
    pointer-events: none;
    font-size: 1.2rem;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.register-input-group:focus-within .register-input-group-icon {
    opacity: 1;
    z-index: 15;
    color: #28a745;
}

.register-form-control, .register-form-select {
    padding: 0.6rem 3rem 0.6rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    width: 100%;
}

.register-form-control:focus, .register-form-select:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.register-gender-options {
    display: flex;
    gap: 2rem;
    margin-top: 0.5rem;
}

.register-form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.register-file-upload-container {
    position: relative;
}

.register-file-input {
    display: none;
}

.register-file-upload-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: 2px dashed #ced4da;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    text-align: center;
}

.register-file-upload-label:hover {
    border-color: #28a745;
    background: #e8f5e8;
}

.register-file-preview {
    margin-top: 1rem;
}

.register-preview-image {
    position: relative;
    display: inline-block;
}

.register-remove-image {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
}

.register-password-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

.register-strength-bar {
    width: 100%;
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

.register-strength-fill {
    height: 100%;
    transition: all 0.3s ease;
}

.register-btn2 {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    width: 100%;
    transition: all 0.3s ease;
}

.register-btn2:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(40, 167, 69, 0.3);
}

/* Responsive Styles for Login/Register Forms */
/* Large screens and up */
@media (min-width: 992px) {
    .login-image-container {
        display: block; /* Show on large screens */
    }
}

/* Medium screens */
@media (max-width: 991px) {
    .login-fullscreen-container {
        flex-direction: column;
        height: auto;
    }
    
    .login-fullscreen-row {
        flex-direction: column;
        height: auto;
    }
    
    .login-image-container {
        display: block;
        height: 250px;
        order: -1; /* Put image on top */
    }
    
    .login-form-container {
        flex: auto;
    }
    
    .login-form-section {
        padding: 1.5rem 1rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.9rem;
    }
    
    .login-form-control {
        padding: 0.6rem 3rem 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    .login-btn2 {
        font-size: 1rem;
        padding: 10px 20px;
        min-width: 180px;
    }
}

@media (max-width: 576px) {
    .login-form-section {
        padding: 1.25rem 0.75rem;
    }
    
    .login-title {
        font-size: 1.3rem;
    }
    
    .login-subtitle {
        font-size: 0.8rem;
    }
    
    .login-form-label {
        font-size: 0.85rem;
    }
    
    .input-hint {
        font-size: 0.75rem;
    }
    
    .login-form-control {
        padding: 0.5rem 3rem 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .login-btn2 {
        font-size: 0.9rem;
        min-width: 160px;
        padding: 8px 16px;
    }
    
    .login-image-container {
        height: 200px;
    }
    
    .fixed-top {
        position: absolute;
    }
}

/* SweetAlert2 RTL styling */
.rtl-alert {
    direction: rtl;
    font-family: 'Almarai', sans-serif;
    text-align: right;
}

/* Course Creation Form Styles */
.lecture-card {
    cursor: move;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #f8f9fa;
}

.lecture-card:hover {
    background: #e9ecef;
}

#selected-lectures-container {
    min-height: 200px;
    border: 2px dashed #ccc;
    padding: 15px;
    margin-bottom: 20px;
}

.lecture-badge {
    margin-right: 5px;
    margin-bottom: 5px;
}

#lectures-loading {
    display: none;
}

.ql-editor {
    direction: rtl;
    text-align: right;
}

#description {
    display: none;
}

#preview_img {
    max-height: 150px;
    object-fit: cover;
}

.available-lectures {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
}
