/* Custom styles goes here */

* {
    scrollbar-width: thin;
    scrollbar-color: var(--bs-primary) rgba(var(--bs-primary-rgb), .12);
}

::-webkit-scrollbar {
    width: .55rem;
    height: .55rem;
}

::-webkit-scrollbar-track {
    background: rgba(var(--bs-primary-rgb), .08);
    border-radius: 999px;
}

::-webkit-scrollbar-thumb {
    background-color: rgba(var(--bs-primary-rgb), .72);
    border: 2px solid transparent;
    border-radius: 999px;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--bs-primary);
}

.ps__rail-x,
.ps__rail-y {
    background-color: transparent !important;
}

.ps .ps__rail-x:hover,
.ps .ps__rail-y:hover,
.ps .ps__rail-x:focus,
.ps .ps__rail-y:focus,
.ps .ps__rail-x.ps--clicking,
.ps .ps__rail-y.ps--clicking {
    background-color: rgba(var(--bs-primary-rgb), .08) !important;
}

.ps__thumb-x,
.ps__thumb-y {
    background-color: rgba(var(--bs-primary-rgb), .72) !important;
}

.ps__rail-x:hover > .ps__thumb-x,
.ps__rail-x:focus > .ps__thumb-x,
.ps__rail-x.ps--clicking .ps__thumb-x,
.ps__rail-y:hover > .ps__thumb-y,
.ps__rail-y:focus > .ps__thumb-y,
.ps__rail-y.ps--clicking .ps__thumb-y {
    background-color: var(--bs-primary) !important;
}

/* DataTable shared shape */
table[data-dt="true"] {
    width: 100% !important;
}

table[data-dt="true"] thead th {
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.75rem 0.5rem;
    vertical-align: middle;
    border-bottom: 2px solid #e9ecef;
}
table[data-dt="true"] tbody td {
    max-width: 18rem;
    padding: 0.625rem 0.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap !important;
    font-size: 0.8125rem;
    vertical-align: middle;
}

.dropdown-menu.dt-dropdown-menu-portal {
    position: fixed !important;
    z-index: 2050;
    margin: 0 !important;
}

/* DataTable responsive rows */
table[data-dt="true"].dtr-inline.collapsed > tbody > tr > td.dtr-control:before,
table[data-dt="true"].dtr-inline.collapsed > tbody > tr > th.dtr-control:before {
    width: 1.35rem;
    height: 1.35rem;
    margin-inline-end: .5rem;
    margin-inline-start: 0;
    border: 1px solid rgba(var(--bs-primary-rgb), .35);
    border-radius: 50%;
    background-color: rgba(var(--bs-primary-rgb), .08);
    color: var(--bs-primary);
    content: "+";
    font-weight: 700;
    line-height: 1.2rem;
    text-align: center;
}

table[data-dt="true"].dtr-inline.collapsed > tbody > tr.parent > td.dtr-control:before,
table[data-dt="true"].dtr-inline.collapsed > tbody > tr.parent > th.dtr-control:before {
    content: "-";
}

table[data-dt="true"] .dt-actions-cell {
    width: 1%;
    white-space: nowrap !important;
    text-align: center !important;
}

table.dataTable > tbody > tr.child td.child {
    padding: .75rem 1.25rem !important;
    background-color: rgba(var(--bs-primary-rgb), .03);
}

.dt-responsive-details {
    width: auto;
    max-width: 100%;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-style: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.dataTable > tbody > tr.child .dt-responsive-details th,
.dataTable > tbody > tr.child .dt-responsive-details td {
    padding: 0.75rem 0.5rem !important;
    text-align: start !important;
    vertical-align: middle !important;
    color: inherit;
    font-family: inherit;
    font-size: 0.8125rem !important;
    font-style: normal !important;
    font-weight: 200 !important;
    line-height: inherit;
    max-width: none !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.dataTable > tbody > tr.child .dt-responsive-details th {
    width: 12rem;
    font-size: 0.8125rem !important;
    font-style: normal !important;
    font-weight: 600 !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}

.dataTable > tbody > tr.child .dt-responsive-details td {
    min-width: 8rem;
}

.dataTable > tbody > tr.child .dt-responsive-details tr:not(:last-child) > th,
.dataTable > tbody > tr.child .dt-responsive-details tr:not(:last-child) > td {
    border-bottom: 1px solid #e9ecef !important;
}

.dataTable > tbody > tr.child .dt-responsive-details tr:last-child > th,
.dataTable > tbody > tr.child .dt-responsive-details tr:last-child > td {
    border-bottom: 0 !important;
}

.dataTable > tbody > tr.child .dt-responsive-details td {
    white-space: normal !important;
    overflow-wrap: anywhere;
}

/* DataTable sorting indicators - always visible on sorted columns */
table.dataTable thead th.sorting_asc:before,
table.dataTable thead th.sorting_desc:after {
    opacity: 1 !important;
    visibility: visible !important;
}
table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:before {
    opacity: 0.2 !important;
    visibility: visible !important;
}

*, body, html {
    font-family: "Cairo", serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
    font-variation-settings: "slnt" 0;
}

.no-spin::-webkit-inner-spin-button,
.no-spin::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.no-spin {
    -moz-appearance: textfield;
}

.tohide{
    display: none;
}

.menu-icon {
    font-size: 1rem !important;
}
.modal-open {
    padding-right: 0 !important;
}

html {
    overflow-y: scroll !important;
}

.swal2-container {
    z-index: 20000 !important;
}

@font-face {
    font-family: Cairo;
    src: url(../fonts/cairo/Cairo-Medium.ttf);
}
.arabic-font {
    font-family: "Cairo", serif;
    font-optical-sizing: auto;
    font-weight: 200;
    font-style: normal;
    font-variation-settings: "slnt" 0;
}

.table th {
    text-transform: none !important;
    font-size:16px; 
    text-align: center !important;
}

.table td {
    text-align: center !important;
}

.app-brand {
    line-height: 2 !important;
}

.menu-hidden {
    display:none !important;
}

/* Sidebar long labels */
.layout-menu .menu-item .menu-link {
    overflow: hidden;
}

.layout-menu .menu-item .menu-link > div:not(.badge) {
    min-width: 0;
}

.layout-menu .menu-sub > .menu-item > .menu-link > div:not(.badge) {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    will-change: transform;
}

.layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:hover > div:not(.badge),
.layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:focus > div:not(.badge),
.layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:focus-within > div:not(.badge) {
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    animation: sidebar-label-marquee-ltr 2.7s ease-in-out infinite alternate;
}

html[dir="rtl"] .layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:hover > div:not(.badge),
html[dir="rtl"] .layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:focus > div:not(.badge),
html[dir="rtl"] .layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:focus-within > div:not(.badge) {
    animation-name: sidebar-label-marquee-rtl;
}

@keyframes sidebar-label-marquee-ltr {
    0%, 18% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(var(--sidebar-label-shift, 0px) * -1));
    }
}

@keyframes sidebar-label-marquee-rtl {
    0%, 18% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(var(--sidebar-label-shift, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    .layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:hover > div:not(.badge),
    .layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:focus > div:not(.badge),
    .layout-menu .menu-sub > .menu-item > .menu-link.has-overflow-label:focus-within > div:not(.badge) {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        animation: none;
    }
}

/* Sidebar nested menu indentation */
.layout-menu .menu-sub > .menu-item > .menu-link {
    padding-inline-start: 3rem !important;
}

.layout-menu .menu-sub > .menu-item > .menu-link.menu-toggle {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.layout-menu .menu-sub > .menu-item > .menu-link.menu-toggle:before {
    content: none !important;
}

.layout-menu .menu-sub > .menu-item > .menu-link:before {
    left: 1.5rem !important;
}

.layout-menu .menu-sub .menu-sub > .menu-item > .menu-link {
    padding-inline-start: 4rem !important;
    font-size: 0.92rem;
    font-weight: 500;
}

.layout-menu .menu-sub .menu-sub > .menu-item > .menu-link:before {
    left: 2.5rem !important;
}

html[dir="rtl"] .layout-menu .menu-sub > .menu-item > .menu-link:before {
    left: auto !important;
    right: 1.5rem !important;
}

html[dir="rtl"] .layout-menu .menu-sub .menu-sub > .menu-item > .menu-link:before {
    left: auto !important;
    right: 2.5rem !important;
}

.entity-detail-summary {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.entity-detail-avatar {
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), .1);
    font-size: 1.35rem;
}

.entity-detail-section {
    padding-block: 1rem;
    border-top: 1px solid var(--bs-border-color);
}

.entity-detail-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.entity-detail-section-title {
    margin-bottom: .75rem;
    color: var(--bs-heading-color);
    font-weight: 700;
}

.entity-detail-field {
    min-height: 100%;
    padding: .75rem;
    border: 1px solid var(--bs-border-color);
    border-radius: .5rem;
    background: var(--bs-paper-bg, #fff);
}

.entity-detail-label {
    display: block;
    margin-bottom: .35rem;
    color: var(--bs-secondary-color);
    font-size: .8125rem;
}

.entity-detail-value {
    display: block;
    color: var(--bs-body-color);
    font-weight: 600;
    overflow-wrap: anywhere;
}

.entity-detail-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.min-w-0 {
    min-width: 0;
}

.file-preview-dialog {
    max-width: min(1180px, calc(100vw - 1.5rem));
}

.file-preview-dialog .modal-content {
    height: calc(100vh - 2rem);
}

.file-preview-header,
.file-preview-footer {
    flex: 0 0 auto;
}

.file-preview-body {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    overflow: hidden;
    background: var(--bs-tertiary-bg, #f8f9fa);
}

.file-preview-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.file-preview-frame {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    background: #fff;
}

@media (max-width: 991.98px) {
    .file-preview-dialog {
        max-width: 100vw;
        margin: 0;
    }

    .file-preview-dialog .modal-content {
        height: 100vh;
        border-radius: 0;
    }
}
/*
select > .error {
    color: none !important;
    font-size: 100% !important;
    margin-top: 0rem !important;
}*/

/*
.password-field:after {
    line-break:initial;
}*/
/*.error:not(li):not(input) {*/
    /*color: #ff4c51;*/
    /*font-size: 100% !important;
    margin-top: 0rem !important;
}*/

/*.ui-autocomplete {
    z-index: 1000 !important;*/ /* Ensure it appears above other elements */
    /*background-color: white;*/ /* Make sure background is visible */
    /*border: 1px solid #ccc;*/ /* Make it stand out */
    /*max-height: 200px;*/ /* Prevent large dropdowns */
    /*overflow-y: auto;*/ /* Enable scrolling */
/*}*/

.ui-autocomplete {
    z-index: 2147483647 !important;
}

.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none; /* Initially hidden */
}


/* Modal Customization */
.modal-content-full-img {
    background: transparent;
    border: none;
}

/* *** FIX: Dynamic Sizing CSS *** */
.modal-dialog-fit-image {
    /* Forces the dialog to shrink-wrap its content (the image) */
    max-width: fit-content !important;
}

/* Ensures the modal content matches the dialog width */
.modal-content-fit-image {
    width: fit-content;
    /* Optional: ensure it doesn't exceed screen width */
    max-width: 90vw;
    margin: auto;
}

/* Set max width/height on the image inside the modal to prevent overflow */
.modal-body-preview img {
    max-height: 90vh; /* Prevents overflow on tall images */
    max-width: 100%; /* Ensures it respects the 90vw max-width of the content */
    height: auto;
    display: block;
}

[v-cloak] {
    display: none !important;
}

#content-skeleton {
    position: absolute;
    inset: 0;
    background: #fff;
    z-index: 10;
}

#content-skeleton.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Skeleton */
/*.skeleton {
    background: linear-gradient( 90deg, #e0e0e0 25%, #f5f5f5 37%, #e0e0e0 63% );
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s infinite ease;
    border-radius: 6px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

.skeleton-input {
    height: 38px;
}

.skeleton-row {
    height: 42px;
}
*/
