﻿/* ========== الخط الأساسي للموقع ========== */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px; /* تحسين مقروئية النص على الشاشات الأكبر */
    }
}





/* ========== تحسين شكل التركيز على العناصر (Inputs, Buttons...) ========== */
.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* ========== إعدادات أساسية للصفحة ========== */
html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px; /* مساحة أسفل الصفحة */
    background-color: var(--background-color);
    font-family:'Tajawal', sans-serif;
    color: var(--text-color);
}

    body::before {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('/img/bani-logo.png');
        background-repeat: no-repeat;
        background-position: center;
        background-size: contain;
        opacity: 0.3;
        z-index: -1;
    }
/* ========== تعريف الألوان الرئيسية كمتغيرات CSS ========== */
:root {
    --primary-color: #0d6efd;
    --primary-light: #3d8bfd;
    --primary-dark: #084298;
    --background-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-color: #212529;
}






/* ========== العناوين الرئيسية ========== */
h1, h2, h3 {
    color: var(--primary-dark);
    font-weight: 600;
}

/* ========== تنسيق الجداول ========== */
.table {
    background-color: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
}

    .table th {
        background: var(--primary-color);
        color: white;
        text-align: center;
    }

    .table td, .table th {
        vertical-align: middle !important;
    }


    .table td,
.table th {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* عند التمرير، تظهر القيمة الكاملة كـ Tooltip */
        .table td:hover,
        .table th:hover {
            overflow: visible;
            white-space: normal;
            position: relative;
            z-index: 10;
        }
        .table td:hover {
            background-color: #f8f9fa;
            
        }
        .table th:hover {
            background-color: #247dff;
        }


/* ========== تحسين عرض الجدول على الشاشات الصغيرة ========== */
@media (max-width: 768px) {
    .table {
        font-size: 14px;
    }

        .table th, .table td {
            padding: 0.5rem;
        }

    h1 {
        font-size: 1.5rem;
    }

    .table thead {
        display: none;
    }

    .table, .table tbody, .table tr, .table td {
        display: block;
        width: 100%;
    }

        .table tr {
            margin-bottom: 1rem;
            background: var(--card-bg);
            color: var(--text-color);
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
            padding: 1rem;
            direction: rtl;
            text-align: right;
        }


        .table td {
            text-align: right;
            padding-right: 50%;
            padding-left: 12rem;
            position: relative;
            border: none;
            text-overflow:unset;
            direction: rtl;
        }

            .table td::before {
                position: absolute;
                top: 0.75rem;
                right: 1rem;
                width: 45%;
                padding-left: 1rem;
                white-space: nowrap;
                font-weight: bold;
                color: #6c757d;
                content: attr(data-label);
                text-align: left;
                direction: rtl;
            }
}



/* ========== الأزرار ========== */
.btn {
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background-color: var(--primary-light);
        border-color: var(--primary-light);
    }

.btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
}

/* ========== روابط داخل خلايا الجدول ========== */
a.link-primary {
    color: var(--primary-color);
    text-decoration: none;
}

    a.link-primary:hover {
        text-decoration: underline;
    }

/* ========== الحاويات والبطاقات العامة ========== */
.container, .table-responsive {
    padding: 1rem;
}

.card {
    border: none;
    border-radius: 10px;
    background-color: var(--card-bg);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ========== حركات انتقال ناعمة لعناصر الصفحة ========== */
* {
    transition: all 0.2s ease-in-out;
}

/* ========== مسافات متكررة جاهزة ========== */
.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.me-1 {
    margin-right: 0.25rem !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-center {
    text-align: center !important;
}

/* ========== روابط عامة ========== */
.link-primary {
    color: #0d6efd;
    text-decoration: none;
}

    .link-primary:hover {
        text-decoration: underline;
    }

/* ========== تنسيقات شريط التنقل (Navbar) ========== */
.bg-gradient-blue {
    background: linear-gradient(90deg, #0d6efd 0%, #3d8bfd 100%);
}

.navbar .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

    .navbar .nav-link:hover {
        color: #dceeff;
        text-decoration: underline;
    }

.navbar-toggler {
    border: 1px solid #ffffff;
}

.navbar-toggler-icon {
    filter: invert(1);
}

.navbar-brand {
    font-size: 1.2rem;
}

/* ========== الفلترة: شكل المستطيل + الحقول الداخلية ========== */
.filter-card {
    background-color: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

    /* الحقول داخل مستطيل الفلترة */
    .filter-card .form-control,
    .filter-card .form-select {
        border-radius: 8px;
        border: 1.5px solid #ced4da;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }

        .filter-card .form-control:focus,
        .filter-card .form-select:focus {
            border-color: var(--primary-color);
            box-shadow: 0 0 6px rgba(13, 110, 253, 0.3);
        }

    /* زر الفلترة */
    .filter-card .btn-primary {
        border-radius: 8px;
        font-weight: 600;
    }

/* تباعد للفلتر على الشاشات الصغيرة */
@media (max-width: 768px) {
    .filter-card {
        padding: 1rem;
    }
}

/* ========== الوضع الليلي (Dark Mode) ========== */
[data-theme="dark"] {
    --bg-color: #1e1e2f;
    --text-color: #f1f1f1;
    --primary-color: #3d8bfd;
    --card-bg: #2c2c3c;
}
    [data-theme="dark"] body {
        background-color: var(--bg-color, #1e1e2f);
        color: var(--text-color, #f1f1f1);
    }

    [data-theme="dark"] .form-control {
        background-color: #2c2c3c;
        color: #f1f1f1;
        border-color: #555;
    }

    [data-theme="dark"] .form-label,
    [data-theme="dark"] .form-check-label,
    [data-theme="dark"] label {
        color: #ddd;
    }

    [data-theme="dark"] .btn-primary {
        background-color: var(--primary-color, #3d8bfd);
        border-color: var(--primary-color, #3d8bfd);
    }

    [data-theme="dark"] .border,
    [data-theme="dark"] .shadow-sm,
    [data-theme="dark"] .bg-white,
    [data-theme="dark"] .form-select {
        background-color: var(--card-bg, #2c2c3c) !important;
        border-color: #555;
        color: white;
    }


    /* زر تبديل الوضع الليلي */
    [data-theme="dark"] #toggle-theme {
        background-color: #343a40;
        color: #f8f9fa;
    }

    /* الجداول في الوضع الليلي */
    [data-theme="dark"] table,
    [data-theme="dark"] .table,
    [data-theme="dark"] .table td {
        color: var(--text-color) !important;
        background-color: transparent !important;
    }

    [data-theme="dark"] .table-light {
        background-color: #3a3a4a !important;
        color: var(--text-color) !important;
    }

    [data-theme="dark"] .text-muted {
        color: #aaa !important;
    }

/* تطبيق الألوان حسب الوضع الحالي */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar, .table, .card {
    background-color: var(--card-bg);
}

a, .btn {
    transition: all 0.3s ease;
}

.form-group input[type="submit"] {
    margin: 20px 0 20px 0;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 6px;
}

/*.card-soft-blue {
    background-color: #e9f2ff !important; 
}
*/



/* From Uiverse.io by vinodjangid07 */
.Btn {
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background-color: blue;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition-duration: .3s;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.11);
}

.svgIcon {
    fill: rgb(255 255 255);
}

.icon2 {
    width: 18px;
    height: 5px;
    border-bottom: 2px solid rgb(182, 143, 255);
    border-left: 2px solid rgb(182, 143, 255);
    border-right: 2px solid rgb(182, 143, 255);
}

.tooltip {
    position: absolute;
    right: -105px;
    opacity: 0;
    background-color: rgb(12, 12, 12);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition-duration: .2s;
    pointer-events: none;
    letter-spacing: 0.5px;
}

    .tooltip::before {
        position: absolute;
        content: "";
        width: 10px;
        height: 10px;
        background-color: rgb(12, 12, 12);
        background-size: 1000%;
        background-position: center;
        transform: rotate(45deg);
        left: -5%;
        transition-duration: .3s;
    }

.Btn:hover .tooltip {
    opacity: 1;
    transition-duration: .3s;
}

.Btn:hover {
    background-color: rgb(150, 94, 255);
    transition-duration: .3s;
}

    .Btn:hover .icon2 {
        border-bottom: 2px solid rgb(235, 235, 235);
        border-left: 2px solid rgb(235, 235, 235);
        border-right: 2px solid rgb(235, 235, 235);
    }

    .Btn:hover .svgIcon {
        fill: rgb(255, 255, 255);
        animation: slide-in-top 0.6s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
    }

/*@keyframes slide-in-top {
    0% {
        transform: translateY(-10px);
        opacity: 0;
    }

    100% {
        transform: translateY(0px);
        opacity: 1;
    }
}*/
/* From Uiverse.io by KINGFRESS */
.buttonadd {
    display: inline-block;
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
    color: black;
    background-color: white;
    padding: 0.8em 1.5em;
    border: none;
    border-radius: .6rem;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    text-decoration: none;
    margin-bottom: 2rem; /* ⇩ Margin bottom */
}


    .buttonadd span:not(:nth-child(6)) {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        height: 30px;
        width: 30px;
        background-color: #0c66ed;
        border-radius: 50%;
        transition: .6s ease;
    }
.buttonadd:hover
{
    color:black;
}

.buttonadd span:nth-child(6) {
    position: relative;
    z-index: 2;
}

    .buttonadd span:nth-child(1) {
        transform: translate(-3.3em, -4em);
    }

    .buttonadd span:nth-child(2) {
        transform: translate(-6em, 1.3em);
    }

    .buttonadd span:nth-child(3) {
        transform: translate(-.2em, 1.8em);
    }

    .buttonadd span:nth-child(4) {
        transform: translate(3.5em, 1.4em);
    }

    .buttonadd span:nth-child(5) {
        transform: translate(3.5em, -3.8em);
    }

    .buttonadd:hover span:not(:nth-child(6)) {
        transform: translate(-50%, -50%) scale(4);
        transition: 1.5s ease;
    }









.file-list {
    list-style: none;
    padding: 0;
    margin-top: 10px;
    max-width: 400px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #8d8d8d;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 12px;
    border-bottom: 1px solid #ddd;
    font-family: Arial, sans-serif;
    font-size: 14px;
}

    .file-item:last-child {
        border-bottom: none;
    }

.file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.remove-btn {
    background-color: #e74c3c;
    border: none;
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

    .remove-btn:hover {
        background-color: #c0392b;
    }





.table-container-scroll {
    max-height: 600px; /* يمكنك التعديل حسب حاجتك */
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    scrollbar-width: thin;
    scrollbar-color: #0d6efd #f1f1f1;
}

    /* Scrollbar للأجهزة التي تدعم Webkit */
    .table-container-scroll::-webkit-scrollbar {
        width: 8px;
    }

    .table-container-scroll::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    .table-container-scroll::-webkit-scrollbar-thumb {
        background-color: #0d6efd;
        border-radius: 10px;
        border: 2px solid #f1f1f1;
    }

        .table-container-scroll::-webkit-scrollbar-thumb:hover {
            background-color: #084298;
        }


.footer-link {
    color: #f8f9fa;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .footer-link:hover {
        color: #0d6efd;
    }

a[b-wmdl5e4wii] {
    color: #000000;
}


.social-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #fff;
    display: inline-flex; /* بدل inline-block */
    align-items: center; /* تمركز عمودي */
    justify-content: center; /* تمركز أفقي */
    margin: 0 8px;
    transition: all 0.3s ease;
    font-size: 16px; /* ممكن تزيد أو تنقص حسب حجم الأيقونة */
}


    .social-icon:hover {
        transform: translateY(-3px);
        color: #fff;
    }

html, body {
    height: 145vh;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}


.extra-fields {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.5s ease;
}

    .extra-fields.show {
        max-height: 1000px; /* قيمة كبيرة كافية لاحتواء الحقول */
        opacity: 1;
        overflow: visible;
    }

/* تنسيق الزر */
#toggleButton {
    margin-top:20px;
    border-radius: 25px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}

    #toggleButton:hover {
        background-color: #0d6efd; /* لون أزرق Bootstrap الأساسي */
        color: white;
        border-color: #0d6efd;
    }






/*
    كود الكارد تبعت التفاصيل */


.text-primary {
    color: #007bff !important;
}

.btn-outline-primary {
    border-color: #007bff;
    color: #007bff;
}

    .btn-outline-primary:hover {
        background-color: #007bff;
        color: white;
    }

#custon-container {
    max-width: 1200px;
}

.col-md-6 {
    margin-bottom: 1rem;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

/* تخصيص الأزرار */
.btn {
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

    .btn-primary:hover {
        background-color: var(--primary-light);
        border-color: var(--primary-light);
    }

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
}

    .btn-secondary:hover {
        background-color: #5a6268;
        border-color: #545b62;
    }





/* CSS لشاشة التحميل */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* لا تظهر إلا عند التأخير */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 1s ease-in-out;
}

/* انيميشن لظهور شاشة التحميل */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* الحركة المميزة لشعار الشركة */
#loading img {
    width: 300px; /* حجم الشعار */
    height: auto;
    animation: spin 2s linear infinite, fadeInLogo 3s ease-in-out infinite; /* الحركة التكرارية */
}

/* حركة التدوير المستمرة */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* تأثير التلاشي والظهور بشكل ممتع */
@keyframes fadeInLogo {
    0% {
        opacity: 0;
        transform: scale(0.5);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }

    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* يمكن تعديل اللون والتدرج في الخلفية لجعلها أكثر جمالًا */
#loading {
    background: linear-gradient(135deg, rgb(212 215 255 / 50%), rgb(0 43 255 / 50%));
}



.toast {
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease-out, transform 0.3s ease-in-out;
    border-radius: 15px;
    background: linear-gradient(45deg, #1e7e34, #28a745); /* تدرج لوني أنيق */
    color: white; /* تأكيد أن الخط أبيض */
    padding: 10px 16px; /* تقليل الارتفاع */
    box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

    .toast.show {
        opacity: 1;
        transform: translateY(0);
    }

    .toast.hide {
        opacity: 0;
        transform: translateY(100%);
    }

    /* الهوفر: تغير التدرج يكون أفتح في المنتصف */
    .toast:hover {
        background: linear-gradient(90deg, #1c7430, #34d27d, #1c7430);
        transform: scale(1.08);
        transition: all 0.4s ease-in-out;
    }

.toast-body h1 {
    font-size: 16px; /* تقليل الحجم قليلاً */
    font-weight: bold;
    margin: 0;
    text-align: center;
    color: white; /* تأكيد لون الخط */
}

.toast-header {
    background-color: transparent;
    border-bottom: 1px solid #ddd;
}

.toast-container {
    z-index: 1050;
    position: fixed;
    top: 20px;
    right: 20px;
}

    .toast-container .btn-close {
        background: none;
        border: none;
        color: white;
        font-size: 1.5rem;
        opacity: 0.6;
        transition: opacity 0.3s ease;
    }

        .toast-container .btn-close:hover {
            opacity: 1;
        }



.toast.toast-error {
    background: linear-gradient(45deg, #a71d2a, #dc3545); /* تدرج لوني أحمر */
}

    .toast.toast-error:hover {
        background: linear-gradient(90deg, #a71d2a, #e66a75, #a71d2a);
    }








    /* bussttype*/

/* ========== Directory Page Styling ========== */
.directory-header h1 {
    font-weight: 700;
}

.directory-accordion .accordion-item {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 12px;
    background-color: var(--card-bg);
}

.directory-accordion .accordion-button {
    font-weight: 700;
    color: var(--primary-dark);
    background-color: var(--card-bg);
}

    .directory-accordion .accordion-button:not(.collapsed) {
        background: linear-gradient(90deg, rgba(13,110,253,0.12) 0%, rgba(61,139,253,0.06) 100%);
    }

.directory-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 28px;
    border-radius: 999px;
    margin-left: 10px;
    font-weight: 700;
    color: white;
    background: linear-gradient(90deg, #0d6efd 0%, #3d8bfd 100%);
    padding: 0 10px;
}

.directory-list li {
    padding: 6px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
}

    .directory-list li:last-child {
        border-bottom: none;
    }

[data-theme="dark"] .directory-list li {
    border-bottom-color: rgba(255,255,255,0.12);
}

/* Print */
@media print {
    header, footer, #toggle-theme, #loading, .directory-tools {
        display: none !important;
    }

    .accordion-button::after {
        display: none !important;
    }

    .accordion-collapse {
        display: block !important;
    }

    .accordion-item {
        box-shadow: none !important;
    }

    body::before {
        display: none !important;
    }
    /* إزالة العلامة المائية بالطباعة */
}
