/* تنسيقات الإشعارات المخصصة */
.custom-notify {
    font-family: 'Tajawal', sans-serif !important;
    direction: rtl !important;
    text-align: right !important;
    border-radius: 0.5rem !important;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15) !important;
    padding: 1rem 1.25rem !important;
    min-width: 300px !important;
    max-width: 400px !important;
    border: none !important;
    border-right: 4px solid #28a745 !important;
    background-color: #ffffff !important;
    color: #212529 !important;
}

.custom-notify[data-notify="container"] {
    margin: 0 0 0.5rem 0 !important;
}

.custom-notify .close-btn {
    float: left !important;
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
    background: transparent !important;
    border: none !important;
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.custom-notify .close-btn i {
    font-size: 1.25rem !important;
    color: #6c757d !important;
    transition: all 0.3s ease !important;
}

.custom-notify .close-btn:hover {
    background-color: #f8f9fa !important;
    transform: scale(1.1) !important;
}

.custom-notify .close-btn:hover i {
    color: #212529 !important;
}

.custom-notify [data-notify="title"] {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #696cff !important;
    display: block !important;
    margin-bottom: 0.5rem !important;
}

.custom-notify [data-notify="message"] {
    font-size: 0.9rem !important;
    color: #6c757d !important;
    line-height: 1.5 !important;
    margin-top: 0.25rem !important;
}

.custom-notify [data-notify="icon"] {
    font-size: 1.5rem !important;
    margin-left: 0.75rem !important;
    margin-right: 0 !important;
    color: #28a745 !important;
}

.custom-notify.alert-success {
    background-color: #ffffff !important;
    color: #212529 !important;
}

/* تنسيقات صناديق رمز التحقق OTP */
.otp-input {
    border: 2px solid #d9dee3 !important;
    border-radius: 0.5rem !important;
    transition: all 0.3s ease !important;
    background-color: #ffffff !important;
}

.otp-input:focus {
    border-color: #696cff !important;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.25) !important;
    outline: none !important;
    background-color: #f8f9fa !important;
}

.otp-input:not(:placeholder-shown) {
    border-color: #696cff !important;
    background-color: #f8f9fa !important;
}

.otp-input-container {
    margin: 1rem 0 !important;
}

/* تنسيقات رسائل الخطأ في النماذج */
.invalid-feedback {
    display: block !important;
    width: 100%;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #ea5455;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
    animation: slideDown 0.3s ease-out;
}

.invalid-feedback i {
    font-size: 1rem;
    vertical-align: middle;
    margin-left: 0.25rem;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #ea5455 !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23ea5455'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6 .4.4.4-.4m0 4.8h.8'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 0.75rem center;
    background-size: 1rem 1rem;
    padding-left: 2.5rem;
    transition: all 0.3s ease;
}

.form-control.is-invalid:focus,
.form-select.is-invalid:focus {
    border-color: #ea5455 !important;
    box-shadow: 0 0 0 0.2rem rgba(234, 84, 85, 0.25) !important;
}

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

/* تنسيقات رسائل النجاح والخطأ المخصصة */
.custom-message {
    margin-bottom: 1.5rem;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    animation: slideDown 0.3s ease-out;
}

.custom-message-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
    position: relative;
}

.custom-message-error .custom-message-content {
    background-color: #fff5f5;
    border-right: 4px solid #ea5455;
}

.custom-message-success .custom-message-content {
    background-color: #f0f9ff;
    border-right: 4px solid #28a745;
}

.custom-message-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.custom-message-error .custom-message-icon {
    background-color: #fee;
    color: #ea5455;
}

.custom-message-success .custom-message-icon {
    background-color: #e8f5e9;
    color: #28a745;
}

.custom-message-text {
    flex: 1;
    min-width: 0;
}

.custom-message-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #212529;
}

.custom-message-error .custom-message-title {
    color: #ea5455;
}

.custom-message-success .custom-message-title {
    color: #28a745;
}

.custom-message-body {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.6;
}

.custom-message-list {
    margin: 0;
    padding-right: 1.25rem;
    list-style: none;
}

.custom-message-list li {
    position: relative;
    padding-right: 1rem;
    margin-bottom: 0.5rem;
}

.custom-message-list li:before {
    content: "•";
    position: absolute;
    right: 0;
    color: #ea5455;
    font-weight: bold;
    font-size: 1.2rem;
}

.custom-message-list li:last-child {
    margin-bottom: 0;
}

.custom-message-close {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    color: #6c757d;
}

.custom-message-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #212529;
    transform: scale(1.1);
}

.custom-message-close i {
    font-size: 1.25rem;
}

/* تنسيقات صورة الموظف في الجدول */
.employee-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
    transition: all 0.3s ease;
}

.employee-avatar:hover {
    border-color: #696cff;
    transform: scale(1.05);
}

.rating-value {
    min-width: 35px;
    color: #696cff;
    font-size: 0.95rem;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

/* تنسيقات محسنة لمقدمة رقم الجوال السعودي */
.saudi-phone-input {
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 0 0 0.0625rem rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.saudi-phone-input:focus-within {
    box-shadow: 0 0 0 0.125rem rgba(105, 108, 255, 0.25), 0 0.125rem 0.25rem rgba(0, 0, 0, 0.1);
    border-color: #696cff;
}

.saudi-phone-prefix {
    background: #ffffff !important;
    color: #212529 !important;
    font-weight: 600;
    font-size: 0.9375rem;
    border: none !important;
    border-right: 0.0625rem solid rgba(0, 0, 0, 0.1) !important;
    padding: 0.625rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 90px;
    justify-content: center;
    box-shadow: none;
    position: relative;
}

.saudi-flag {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
    display: inline-block;
    vertical-align: middle;
    box-shadow: 0 0.0625rem 0.125rem rgba(0, 0, 0, 0.1);
}

.saudi-code {
    letter-spacing: 0.05em;
    color: #495057;
}

.saudi-phone-input .form-control {
    border: none !important;
    border-left: 0.0625rem solid rgba(0, 0, 0, 0.1) !important;
    padding: 0.625rem 0.9375rem;
    font-size: 0.9375rem;
    transition: all 0.3s ease;
}

.saudi-phone-input .form-control:focus {
    border-color: transparent !important;
    box-shadow: none !important;
    background-color: #f8f9fa;
}

.saudi-phone-input:hover .saudi-phone-prefix {
    background: #f8f9fa !important;
}

@media (max-width: 576px) {
    .saudi-phone-prefix {
        min-width: 80px;
        padding: 0.625rem 0.75rem;
        font-size: 0.875rem;
        gap: 0.375rem;
    }
    
    .saudi-flag {
        font-size: 1.125rem;
    }
    
    .saudi-code {
        font-size: 0.875rem;
    }
}

/* إصلاح مشكلة الجداول في الشاشات الصغيرة */
.table-responsive {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-y: hidden !important;
    position: relative !important;
}

.table-responsive table {
    width: 100% !important;
    min-width: 800px !important;
    margin-bottom: 0 !important;
    table-layout: auto !important;
}

/* للجداول الصغيرة */
.table-responsive table.table-sm {
    min-width: 600px !important;
}

/* منع overflow للصفحة في الشاشات الصغيرة */
@media (max-width: 991.98px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }
    
    .layout-wrapper {
        overflow-x: hidden !important;
    }
    
    .layout-page {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    .content-wrapper {
        overflow-x: hidden !important;
        max-width: 100% !important;
    }
    
    .container-xxl:not(.layout-navbar):not(nav) {
        overflow-x: hidden !important;
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* السماح للـ navbar بالظهور بشكل صحيح */
    .layout-navbar.container-xxl,
    nav.container-xxl,
    #layout-navbar.container-xxl {
        overflow: visible !important;
        overflow-x: visible !important;
        overflow-y: visible !important;
    }
    
    /* التأكد من أن الجداول فقط لديها scroll */
    .card {
        overflow: visible !important;
        max-width: 100% !important;
    }
    
    .card-body {
        overflow: visible !important;
        padding: 1rem !important;
    }
    
    /* التأكد من أن table-responsive فقط لديها scroll */
    .table-responsive {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* تحسين مظهر scrollbar للجداول */
.table-responsive::-webkit-scrollbar {
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

    .table-responsive::-webkit-scrollbar-thumb:hover {
        background: #555;
    }

/* إزالة السهم التلقائي من قائمة الخدمات (السهم على اليسار) */
.menu-toggle::after {
    display: none !important;
}

/* تنسيق السهم المخصص على اليمين في قائمة الخدمات */
#services-chevron {
    font-size: 1rem;
    transition: transform 0.3s ease;
    margin-right: 66px;
}

