/* Login Modal Styles */
.login-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
}

.login-modal-header {
    background: #fff;
    border-bottom: none;
    padding: 30px 30px 20px 30px;
    text-align: center;
    position: relative;
}

.login-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a2b5f;
    margin: 0;
    text-align: center;
    width: 100%;
}

.login-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.login-modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.login-modal-body {
    padding: 20px 30px 30px 30px;
    background: #fff;
}

.login-form {
    width: 100%;
}

.login-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-align: right;
    display: block;
}

.login-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    text-align: right;
    direction: rtl;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.login-input:focus {
    border-color: #4a6cb5;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 181, 0.25);
    background-color: #fff;
    outline: none;
}

.login-input::placeholder {
    color: #adb5bd;
    font-size: 13px;
}

.forgot-password-link {
    color: #1763DE;
    font-size: 14px;
    text-decoration: none;
    float: right;
    transition: color 0.3s ease;
}

.forgot-password-link:hover {
    color: #3d5a9a;
    text-decoration: underline;
}

.btn-login-submit {
    width: 100%;
    background: #3846E4;
    background-color: #3846E4;
    border: 1px solid #3846E4;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    /* box-shadow: 0 4px 15px rgba(74, 108, 181, 0.3); */
}

button.submit, button[type='submit'] {
    padding: 0px 25px;
    height: 48px;
}

.btn-login-submit:hover {
    background: #3846E4;
    background-color: #3846E4;
    border: 1px solid #3846E4;
    transform: translateY(-2px);
    /* box-shadow: 0 6px 20px rgba(74, 108, 181, 0.4); */
}

button.submit, button[type='submit'] {
    border: 1px solid #6478FD;
    background: linear-gradient(290.81deg, #3846E4 0.29%, #6478FD 99.92%) !important;
}

button.submit:hover, button[type="submit"]:hover {
    background-color: #3846E4 !important;
}


.login-footer {
    text-align: center;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.register-link {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.create-account-link {
    color: #1763DE;
    text-decoration: none;
    font-weight: normal;
    transition: color 0.3s ease;
}

.create-account-link:hover {
    color: #3d5a9a;
    text-decoration: underline;
}

/* Modal Backdrop */
.modal-backdrop {
    background-color: rgba(0, 0, 0, 0.6);
}

/* Animation */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-modal-content {
        margin: 20px;
        max-width: none;
    }
    
    .login-modal-header {
        padding: 25px 20px 15px 20px;
    }
    
    .login-modal-title {
        font-size: 20px;
    }
    
    .login-modal-body {
        padding: 15px 20px 25px 20px;
    }
    
    .login-modal-close {
        top: 15px;
        left: 15px;
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .login-modal-header {
        padding: 20px 15px 10px 15px;
    }
    
    .login-modal-title {
        font-size: 18px;
    }
    
    .login-modal-body {
        padding: 10px 15px 20px 15px;
    }
    
    .login-input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .btn-login-submit {
        padding: 12px;
        font-size: 15px;
    }
}

/* RTL Support */
[dir="rtl"] .login-modal-close {
    left: auto;
    right: 20px;
}

[dir="rtl"] .forgot-password-link {
    float: left;
}

[dir="rtl"] .login-input {
    text-align: right;
    direction: rtl;
}

/* Form Validation States */
.login-input.is-invalid {
    border-color: #dc3545;
}

.login-input.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

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

.login-input.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.btn-login-submit {
    margin-top: 20px;
}

/* Loading State */
.btn-login-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-login-submit.loading {
    position: relative;
    color: transparent;
}

.btn-login-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
/* Register Modal Styles */
.register-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 550px;
    margin: 0 auto;
}

.register-modal-header {
    background: #fff;
    border-bottom: none;
    padding: 30px 30px 20px 30px;
    text-align: center;
    position: relative;
}

.register-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a2b5f;
    margin: 0;
    text-align: center;
    width: 100%;
}

.register-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.register-modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.register-modal-body {
    padding: 20px 30px 30px 30px;
    background: #fff;
}

.register-form {
    width: 100%;
}

.register-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-align: right;
    display: block;
}

.register-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    text-align: right;
    direction: rtl;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.register-input:focus {
    border-color: #4a6cb5;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 181, 0.25);
    background-color: #fff;
    outline: none;
}

.register-input::placeholder {
    color: #adb5bd;
    font-size: 13px;
}

/* Phone Input Wrapper */
.phone-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    direction: rtl;
}

.phone-input-wrapper:focus-within {
    border-color: #4a6cb5;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 181, 0.25);
    background-color: #fff;
}

.country-code {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    border-left: 1px solid #e9ecef;
    background-color: #FFF;
    white-space: nowrap;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.phone-input {
    border: none !important;
    background-color: #FFF !important;
    box-shadow: none !important;
    padding: 12px 15px;
    flex: 1;
}

.phone-input:focus {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.btn-register-submit {
    width: 100%;
    background: linear-gradient(135deg, #4a6cb5 0%, #5a7cc5 100%);
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(74, 108, 181, 0.3);
}

.btn-register-submit:hover {
    background: linear-gradient(135deg, #3d5a9a 0%, #4d6aaa 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 108, 181, 0.4);
}

.register-footer {
    text-align: center;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.login-link {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.signin-link {
    color: #1763DE;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.signin-link:hover {
    color: #3d5a9a;
    text-decoration: underline;
}

/* Responsive Design for Register Modal */
@media (max-width: 768px) {
    .register-modal-content {
        margin: 20px;
        max-width: none;
    }
    
    .register-modal-header {
        padding: 25px 20px 15px 20px;
    }
    
    .register-modal-title {
        font-size: 20px;
    }
    
    .register-modal-body {
        padding: 15px 20px 25px 20px;
    }
    
    .register-modal-close {
        top: 15px;
        left: 15px;
        width: 25px;
        height: 25px;
        font-size: 18px;
    }
    
    .country-code {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .flag-icon {
        width: 18px;
        height: 13px;
    }
}

@media (max-width: 480px) {
    .register-modal-header {
        padding: 20px 15px 10px 15px;
    }
    
    .register-modal-title {
        font-size: 18px;
    }
    
    .register-modal-body {
        padding: 10px 15px 20px 15px;
    }
    
    .register-input {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .phone-input {
        padding: 10px 12px;
    }
    
    .country-code {
        padding: 10px;
        font-size: 12px;
    }
    
    .btn-register-submit {
        padding: 12px;
        font-size: 15px;
    }
}

/* RTL Support for Register Modal */
[dir="rtl"] .register-modal-close {
    left: auto;
    right: 20px;
}

[dir="rtl"] .register-input {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .phone-input-wrapper {
    direction: rtl;
}

[dir="rtl"] .country-code {
    border-left: none;
    border-right: 1px solid #e9ecef;
}

/* Form Validation States for Register */
.register-input.is-invalid {
    border-color: #dc3545;
}

.register-input.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

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

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

.phone-input-wrapper.is-invalid {
    border-color: #dc3545;
}

.phone-input-wrapper.is-invalid:focus-within {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

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

.phone-input-wrapper.is-valid:focus-within {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Loading State for Register */
.btn-register-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-register-submit.loading {
    position: relative;
    color: transparent;
}

.btn-register-submit.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
}


/* Country Dropdown Styles */
.country-code-dropdown {
    position: relative;
}

.country-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 15px;
    border: none;
    background-color: #FFF;
    border-left: 1px solid #e9ecef;
    white-space: nowrap;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.country-selector:hover {
    background-color: #f8f9fa;
}

.country-selector i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.country-selector.active i {
    transform: rotate(180deg);
}

.country-dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    max-height: 300px;
    overflow-y: auto;
    min-width: 280px;
    z-index: 1000;
    display: none;
    direction: rtl;
}

.country-dropdown-menu.show {
    display: block;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f8f9fa;
}

.country-option:last-child {
    border-bottom: none;
}

.country-option:hover {
    background-color: #f8f9fa;
}

.country-option .flag-icon {
    width: 24px;
    height: 18px;
    object-fit: cover;
    border-radius: 3px;
    flex-shrink: 0;
}

.country-option .country-name {
    flex: 1;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
}

.country-option .country-code {
    font-size: 13px;
    color: #6c757d;
    font-weight: 600;
}

/* Scrollbar Styling */
.country-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.country-dropdown-menu::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.country-dropdown-menu::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 10px;
}

.country-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* RTL Support for Country Dropdown */
[dir="rtl"] .country-dropdown-menu {
    right: 0;
    left: auto;
}

[dir="rtl"] .country-selector {
    border-left: none;
    border-right: 1px solid #e9ecef;
}

/* Responsive Design for Country Dropdown */
@media (max-width: 768px) {
    .country-dropdown-menu {
        min-width: 250px;
        max-height: 250px;
    }
    
    .country-option {
        padding: 10px 12px;
    }
    
    .country-option .flag-icon {
        width: 20px;
        height: 15px;
    }
    
    .country-option .country-name {
        font-size: 13px;
    }
    
    .country-option .country-code {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .country-dropdown-menu {
        min-width: 220px;
        max-height: 200px;
    }
    
    .country-selector {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .country-option {
        padding: 8px 10px;
        gap: 8px;
    }
}


/* Country Search Styles */
.country-search-wrapper {
    position: sticky;
    top: 0;
    background: #fff;
    padding: 12px 15px;
    border-bottom: 2px solid #e9ecef;
    z-index: 10;
}

.country-search-wrapper {
    position: relative;
}

.country-search-input {
    width: 100%;
    padding: 10px 40px 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    text-align: right;
    direction: rtl;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.country-search-input:focus {
    border-color: #4a6cb5;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 181, 0.15);
    background-color: #fff;
    outline: none;
}

.country-search-input::placeholder {
    color: #adb5bd;
    font-size: 13px;
}

.country-search-wrapper i {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    font-size: 16px;
    pointer-events: none;
}

.country-options-list {
    max-height: 250px;
    overflow-y: auto;
}

.country-option.hidden {
    display: none;
}

/* RTL Support for Search */
[dir="rtl"] .country-search-wrapper i {
    left: auto;
    right: 25px;
}

[dir="rtl"] .country-search-input {
    padding: 10px 15px 10px 40px;
}

/* Responsive Design for Search */
@media (max-width: 768px) {
    .country-search-wrapper {
        padding: 10px 12px;
    }
    
    .country-search-input {
        padding: 8px 35px 8px 12px;
        font-size: 13px;
    }
    
    .country-search-wrapper i {
        font-size: 14px;
        left: 20px;
    }
    
    [dir="rtl"] .country-search-wrapper i {
        right: 20px;
    }
    
    [dir="rtl"] .country-search-input {
        padding: 8px 12px 8px 35px;
    }
}


/* OTP Modal Styles */
.otp-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 500px;
    margin: 0 auto;
}

.otp-modal-header {
    background: #fff;
    border-bottom: none;
    padding: 30px 30px 20px 30px;
    text-align: center;
    position: relative;
}

.otp-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a2b5f;
    margin: 0;
    text-align: center;
    width: 100%;
}

.otp-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.otp-modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.otp-modal-body {
    padding: 20px 30px 30px 30px;
    background: #fff;
}

.otp-description {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 30px;
    direction: rtl;
}

.otp-description strong {
    color: #4a6cb5;
    font-weight: 600;
}

.otp-form {
    width: 100%;
}

.otp-inputs-wrapper {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    direction: ltr;
}

.otp-input {
    width: 50px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    color: #1a2b5f;
    padding: 0;
}

.otp-input:focus {
    border-color: #4a6cb5;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 181, 0.25);
    background-color: #fff;
    outline: none;
}

.otp-input.filled {
    border-color: #28a745;
    background-color: #fff;
}

.otp-input.error {
    border-color: #dc3545;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.otp-error-message {
    text-align: center;
    color: #dc3545;
    font-size: 14px;
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8d7da;
    border-radius: 8px;
    direction: rtl;
}

.btn-otp-submit {
    width: 100%;
    background: #3846E4;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-otp-submit:hover {
    background: #2d38c0;
    transform: translateY(-2px);
}

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

.otp-resend-wrapper {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.otp-resend-text {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
    direction: rtl;
}

.btn-resend-otp {
    background: none;
    border: none;
    color: #4a6cb5;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.btn-resend-otp:hover:not(:disabled) {
    color: #3d5a9a;
    text-decoration: underline;
}

.btn-resend-otp:disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

/* Responsive Design for OTP Modal */
@media (max-width: 768px) {
    .otp-modal-content {
        margin: 20px;
        max-width: none;
    }
    
    .otp-modal-header {
        padding: 25px 20px 15px 20px;
    }
    
    .otp-modal-title {
        font-size: 20px;
    }
    
    .otp-modal-body {
        padding: 15px 20px 25px 20px;
    }
    
    .otp-inputs-wrapper {
        gap: 8px;
    }
    
    .otp-input {
        width: 45px;
        height: 55px;
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .otp-modal-header {
        padding: 20px 15px 10px 15px;
    }
    
    .otp-modal-title {
        font-size: 18px;
    }
    
    .otp-modal-body {
        padding: 10px 15px 20px 15px;
    }
    
    .otp-description {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .otp-inputs-wrapper {
        gap: 6px;
    }
    
    .otp-input {
        width: 40px;
        height: 50px;
        font-size: 20px;
    }
    
    .btn-otp-submit {
        padding: 12px;
        font-size: 15px;
    }
}

/* RTL Support for OTP Modal */
[dir="rtl"] .otp-modal-close {
    left: auto;
    right: 20px;
}


/* User Profile Dropdown Styles */
.user-profile-dropdown {
    position: relative;
}

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    /* background: #fff;
    border: 2px solid #e9ecef; */
    background: transparent;
    border: 0;
    border-radius: 50px;
    padding: 8px 20px 8px 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* .profile-trigger:hover {
    border-color: #4a6cb5;
    box-shadow: 0 4px 12px rgba(74, 108, 181, 0.15);
} */

.profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e9ecef;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-name {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    /* color: #1a2b5f; */
}

.profile-trigger i {
    font-size: 12px;
    color: #FFF;
    /* color: #6c757d; */
    transition: transform 0.3s ease;
}

.profile-trigger.active i {
    transform: rotate(180deg);
}

.profile-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: -92%;
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 280px;
    z-index: 99999999;
    display: none;
    overflow: hidden;
}

.profile-dropdown-menu.show {
    display: block;
    animation: slideDown 0.3s ease;
}

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

.profile-dropdown-header {
    padding: 20px;
    /* background: linear-gradient(135deg, #4a6cb5 0%, #5a7cc5 100%); */
    background: #263d95;
    color: #fff;
    direction: rtl;
}

.profile-info h6 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: #fff;
}

.profile-info p {
    font-size: 13px;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.profile-dropdown-body {
    padding: 10px 0;
}

.profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #495057;
    text-decoration: none;
    transition: all 0.3s ease;
    direction: rtl;
}

.profile-dropdown-item:hover {
    background-color: #f8f9fa;
    color: #4a6cb5;
}

.profile-dropdown-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.profile-dropdown-item span {
    font-size: 14px;
    font-weight: 500;
}

/* RTL Support */
[dir="rtl"] .profile-dropdown-menu {
    right: 0;
    left: auto;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .profile-trigger {
        padding: 6px 15px 6px 6px;
    }
    
    .profile-avatar {
        width: 35px;
        height: 35px;
    }
    
    .profile-name {
        font-size: 14px;
    }
    
    .profile-dropdown-menu {
        min-width: 250px;
    }
}

@media (max-width: 768px) {
    .user-profile-dropdown {
        display: none !important;
    }
}


/* Forgot Password Modal Styles */
.forgot-modal-content,
.reset-modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    max-width: 450px;
    margin: 0 auto;
}

.forgot-modal-header,
.reset-modal-header {
    background: #fff;
    border-bottom: none;
    padding: 30px 30px 20px 30px;
    text-align: center;
    position: relative;
}

.forgot-modal-title,
.reset-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #1a2b5f;
    margin: 0;
    text-align: center;
    width: 100%;
}

.forgot-modal-close,
.reset-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.forgot-modal-close:hover,
.reset-modal-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.forgot-modal-body,
.reset-modal-body {
    padding: 20px 30px 30px 30px;
    background: #fff;
}

.forgot-description,
.reset-description {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 25px;
    direction: rtl;
}

.forgot-form,
.reset-form {
    width: 100%;
}

.forgot-label,
.reset-label {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
    text-align: right;
    display: block;
}

.forgot-input,
.reset-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    text-align: right;
    direction: rtl;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.forgot-input:focus,
.reset-input:focus {
    border-color: #4a6cb5;
    box-shadow: 0 0 0 0.2rem rgba(74, 108, 181, 0.25);
    background-color: #fff;
    outline: none;
}

.forgot-input::placeholder,
.reset-input::placeholder {
    color: #adb5bd;
    font-size: 13px;
}

.btn-forgot-submit,
.btn-reset-submit {
    width: 100%;
    background: #3846E4;
    color: #fff;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-forgot-submit:hover,
.btn-reset-submit:hover {
    background: #2d38c0;
    transform: translateY(-2px);
}

.btn-forgot-submit:disabled,
.btn-reset-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.forgot-footer {
    text-align: center;
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.back-to-login {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

.back-link {
    color: #4a6cb5;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #3d5a9a;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .forgot-modal-content,
    .reset-modal-content {
        margin: 20px;
        max-width: none;
    }
    
    .forgot-modal-header,
    .reset-modal-header {
        padding: 25px 20px 15px 20px;
    }
    
    .forgot-modal-title,
    .reset-modal-title {
        font-size: 20px;
    }
    
    .forgot-modal-body,
    .reset-modal-body {
        padding: 15px 20px 25px 20px;
    }
}

@media (max-width: 480px) {
    .forgot-modal-header,
    .reset-modal-header {
        padding: 20px 15px 10px 15px;
    }
    
    .forgot-modal-title,
    .reset-modal-title {
        font-size: 18px;
    }
    
    .forgot-modal-body,
    .reset-modal-body {
        padding: 10px 15px 20px 15px;
    }
}

/* RTL Support */
[dir="rtl"] .forgot-modal-close,
[dir="rtl"] .reset-modal-close {
    left: auto;
    right: 20px;
}


/* Package details modal — follows the selected package palette */
#packageDetailsModal .package-details-dialog {
    width: min(720px, calc(100% - 32px)) !important;
    max-width: 720px !important;
}

.package-modal-content {
    background: var(--package-card, #ffffff) !important;
    border-radius: 18px !important;
    border: 1px solid var(--package-border, #e5e7eb) !important;
    box-shadow: 0 22px 60px rgba(var(--package-rgb, 79, 70, 229), .18) !important;
    overflow: hidden !important;
    color: #495057 !important;
    font-family: "IBM Plex Sans Arabic", -apple-system, BlinkMacSystemFont, Arial, sans-serif !important;
}

.package-modal-header {
    background: var(--package-card, #ffffff) !important;
    border-bottom: 1px solid var(--package-border, #e5e7eb) !important;
    padding: 16px 20px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: relative !important;
}

.package-modal-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--package-card-text, #172554) !important;
    margin: 0 !important;
}

.package-modal-close {
    position: absolute !important;
    top: 12px !important;
    left: 14px !important;
    right: auto !important;
    background-image: none !important;
    background: var(--package-soft, #f8f9fa) !important;
    border: 1px solid var(--package-border, #e5e7eb) !important;
    border-radius: 10px !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--package-card-text, #495057) !important;
    opacity: 1 !important;
    font-size: 16px !important;
    transition: background-color .2s ease, color .2s ease !important;
    cursor: pointer !important;
    padding: 0 !important;
}

.package-modal-close:hover {
    background: var(--package-border, #e9ecef) !important;
    color: var(--package-main, #1a2b5f) !important;
}

.package-modal-body {
    padding: 20px !important;
    background: var(--package-card, #ffffff) !important;
    max-height: min(68vh, 610px) !important;
    overflow-y: auto !important;
}

.package-details-content {
    text-align: right !important;
    direction: rtl !important;
}

.package-header-info {
    margin-bottom: 16px !important;
    text-align: center !important;
}

.package-title-modal {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--package-card-text, #1a2b5f) !important;
    margin-bottom: 7px !important;
    display: inline-block !important;
}

.package-description-modal {
    font-size: 13px !important;
    color: color-mix(in srgb, var(--package-card-text, #495057) 68%, transparent) !important;
    line-height: 1.65 !important;
    margin: 0 auto !important;
    max-width: 90% !important;
}

.package-price-section {
    background: linear-gradient(135deg, var(--package-card, #fff), var(--package-soft, #f1f3f5)) !important;
    border: 1px solid var(--package-border, #e9ecef) !important;
    border-radius: 13px !important;
    padding: 13px 18px !important;
    margin-bottom: 15px !important;
    box-shadow: none !important;
}

.price-display {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
}

.modal-old-price {
    font-size: 16px !important;
    color: #adb5bd !important;
    text-decoration: line-through !important;
    font-weight: 500 !important;
}

.modal-current-price {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--package-main, #6F72F3) !important;
    text-shadow: none !important;
}

.modal-duration {
    font-size: 13px !important;
    color: color-mix(in srgb, var(--package-card-text, #495057) 65%, transparent) !important;
    font-weight: 500 !important;
}

.package-features-section {
    margin-bottom: 10px !important;
}

.package-features-section h5 {
    font-size: 16px !important;
    font-weight: 700 !important;
    color: #1a2b5f !important;
    margin-bottom: 15px !important;
    text-align: right !important;
}

.modal-features-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.modal-features-list li {
    padding: 9px 2px !important;
    border-bottom: 1px solid var(--package-border, #f1f3f5) !important;
    font-size: 13px !important;
    color: var(--package-card-text, #495057) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    direction: rtl !important;
}

.modal-features-list li:last-child {
    border-bottom: none !important;
}

.modal-features-list li i {
    color: var(--package-main, #22c55e) !important;
    font-size: 15px !important;
    flex-shrink: 0 !important;
}

.package-modal-footer {
    padding: 13px 20px !important;
    border-top: 1px solid var(--package-border, #e9ecef) !important;
    background: var(--package-soft, #f8f9fa) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 10px !important;
}

.package-modal-footer .btn {
    padding: 10px 24px !important;
    border-radius: 9px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: none !important;
}

.package-modal-footer .btn-secondary {
    background: #e9ecef !important;
    color: #495057 !important;
}

.package-modal-footer .btn-secondary:hover {
    background: #dee2e6 !important;
}

.package-modal-footer .btn-primary {
    background: linear-gradient(135deg, var(--package-main, #3846E4), var(--package-main-dark, #6478FD)) !important;
    color: var(--package-main-text, #fff) !important;
    box-shadow: 0 6px 16px rgba(var(--package-rgb, 56, 70, 228), .22) !important;
}

.package-modal-footer .btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 8px 20px rgba(var(--package-rgb, 56, 70, 228), .3) !important;
}

#packageDetailsModal #modalSubPackagesSection {
    margin-bottom: 0 !important;
}

#packageDetailsModal #modalSubPackagesSection .sub-packages-tabs {
    gap: 5px !important;
    padding: 5px !important;
    background: rgba(var(--package-rgb, 79, 70, 229), .05) !important;
    border-color: var(--package-border, #c7d2fe) !important;
    border-radius: 13px !important;
}

#packageDetailsModal #modalSubPackagesSection .tab-item {
    min-width: 0 !important;
    padding: 9px 4px !important;
    border-radius: 9px !important;
    overflow: hidden !important;
}

#packageDetailsModal #modalSubPackagesSection .tab-item.active {
    background: linear-gradient(135deg, var(--package-main), var(--package-main-dark)) !important;
    border-color: var(--package-main) !important;
    box-shadow: 0 6px 16px rgba(var(--package-rgb), .24) !important;
    transform: none !important;
}

#packageDetailsModal #modalSubPackagesSection .tab-item.active span {
    color: var(--package-main-text) !important;
}

#packageDetailsModal #modalSubPackagesSection .tab-price {
    font-size: 17px !important;
    white-space: nowrap !important;
}

.btn-subscribe-now:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Responsive */
@media (max-width: 768px) {
    #packageDetailsModal .package-details-dialog {
        width: calc(100% - 20px) !important;
        margin: 10px auto !important;
    }

    .package-modal-content {
        margin: 0 !important;
        border-radius: 16px !important;
        max-height: calc(100dvh - 20px) !important;
    }
    
    .package-modal-header {
        padding: 13px 16px !important;
    }
    
    .package-modal-title {
        font-size: 16px !important;
    }
    
    .package-modal-body {
        padding: 14px !important;
        max-height: min(68dvh, 610px) !important;
    }
    
    .package-title-modal {
        font-size: 18px !important;
    }
    
    .package-description-modal {
        font-size: 12px !important;
        max-width: 100% !important;
    }
    
    .modal-current-price {
        font-size: 22px !important;
    }
    
    .package-modal-footer {
        flex-direction: row !important;
        padding: 10px 14px !important;
    }
    
    .package-modal-footer .btn {
        width: auto !important;
        padding: 9px 15px !important;
    }

    .package-modal-footer .btn-primary {
        flex: 1 1 auto !important;
    }

    #packageDetailsModal #modalSubPackagesSection .tab-item {
        padding: 7px 2px !important;
    }

    #packageDetailsModal #modalSubPackagesSection .tab-duration,
    #packageDetailsModal #modalSubPackagesSection .tab-currency {
        font-size: 10px !important;
    }

    #packageDetailsModal #modalSubPackagesSection .tab-price {
        font-size: clamp(13px, 4.4vw, 17px) !important;
        letter-spacing: -.25px !important;
    }
}

/* RTL Support */
[dir="rtl"] .package-modal-close {
    left: 14px !important;
    right: auto !important;
}
