﻿/* -----------------------------------------------------------------------------
           1) FULL-SCREEN OVERLAY ELEMENT (#rotateOverlay)
           2) HIDE *EVERYTHING* under <body> except this overlay when in portrait-mode
        ----------------------------------------------------------------------------- */
#rotateOverlay {
    display: none; /* hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /*background: rgba(0, 0, 0, 0.85);*/
    /*color: #ffffff;*/
    z-index: 9999;
    text-align: center;
    /* REMOVE the padding centering */
    /* padding-top: 40vh; */
    /* TRUE centering */
    align-items: center; /* vertical */
    justify-content: center; /* horizontal */
    /* optional but usually helpful */
    padding: 24px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 1.2rem;
    flex-direction: column;
    gap: 16px;
}

body.portrait-mode #rotateOverlay {
    display: flex !important;
}

/* When <body> has .portrait-mode, hide all body‐children except #rotateOverlay */
body.portrait-mode > *:not(#rotateOverlay) {
    display: none !important;
}

.body-home-logo {
    text-align: center;
}

/* Allow all text to wrap inside this specific container */
.home-cards-container .card-body,
.home-cards-container .card-body * {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
}

.home-cards-container .inner-cards-container .card {
    /* Allow each card to shrink below its content’s minimum width */
    min-width: 0;
    /* (Optional) hide any overflow so shrunken text doesn’t escape */
    overflow: hidden;
}

/* Ensure *all* text inside these cards can break */
.home-cards-container .card,
.home-cards-container .card * {
    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ========================================= */
/*  MERGED CSS FROM YOUR TWO ORIGINAL FILES  */
/* ========================================= */

/* -------------------------------------------------- */
/* 1) Base case (XL and up): Navbar sits above Menu   */
/* -------------------------------------------------- */
#layout-navbar {
    z-index: 1300;
}

#layout-menu {
    /*isolation: isolate !important;*/
    z-index: 1200 !important;
    max-height: calc(100dvh - 60px);
    -webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------------
   1) By default (desktop ≥1200px), show “System Tour” and hide “Tour”
   ------------------------------------------------------------------ */
#SystemTour .desktop-text {
    display: inline;
}

#SystemTour .mobile-text {
    display: none;
}

/* ------------------------------------------------------------------
   2) On “mobile” (≤1199.98px), hide “System Tour” and show “Tour”
   ------------------------------------------------------------------ */
@media (max-width: 1199.98px) {
    #SystemTour .desktop-text {
        display: none;
    }

    #SystemTour .mobile-text {
        display: inline;
    }

    /* Keep your existing mobile rules for other elements: */
    .hide-on-mobile {
        display: none !important;
    }

    .hide-on-mobile-ignore {
        display: inline-block !important;
    }

    /* (Other mobile‐specific styles you had…) */
    #NavBarLogo {
        max-height: 50px;
    }

    #layout-menu {
        z-index: 1400 !important;
    }

    body {
        padding-top: 20px !important;
    }

    #form-container.container-p-y,
    .container-p-y {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .content-wrapper {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .d-flex.d-xl-none.align-items-center {
        position: relative !important;
    }
}

/* -------------------------------------------------- */
/* 3) Force the “brand” wrapper to be only as tall    */
/*    as its contents (for desktop/mobile)            */
/* -------------------------------------------------- */
.navbar-brand.app-brand.demo {
    padding-top: 0;
    padding-bottom: 0;
    line-height: 0; /* if the chevron is too tall, tweak this */
}

/* -------------------------------------------------- */
/* 4) If the chevron <i> has any top/bottom margin,   */
/*    zero it out                                     */
/* -------------------------------------------------- */
.layout-menu-toggle.menu-link i {
    margin: 0;
    padding: 0;
    line-height: 1; /* so it doesn’t force the parent taller */
}

/* -------------------------------------------------- */
/* 5) Override Sneat’s forced height/min-height on    */
/*    that dummy-brand placeholder                    */
/* -------------------------------------------------- */
.override-navbar-brand {
    height: auto !important;
    min-height: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* -------------------------------------------------- */
/* 6) Original .navbar-x rule (if you still need it)  */
/* -------------------------------------------------- */
.navbar-x {
    position: absolute !important;
    top: -12px !important; /* flush with the very top of .align-items-center */
    right: 0 !important; /* flush with the very right edge */
    margin: -20px !important; /* remove any extra margins */
    padding: 0; /* remove any extra padding */
    line-height: 1;
    z-index: 9999 !important; /* guarantee it sits above everything */
}

:root {
    --g: 12px;
    --footer-h: 0px; /* will be set by JS */
    --form-top: 0px; /* will be set by JS */
}

/* Lock the page; inner container scrolls */
html, body {
    height: 100%;
    overflow: hidden !important;
}

/* Flex ancestors must allow shrink/scroll */
.layout-wrapper,
.layout-container,
.layout-page,
.content-wrapper {
    min-height: 0 !important;
}

/* Keep full-width if you're using container-xxl */
#form-container.container-xxl {
    max-width: 100%;
}

/* Make #form-container the only scroller and stop under the footer */
#form-container {
    /* dvh for mobile; fallback to vh if not supported */
    height: calc(100vh - var(--footer-h) - var(--form-top));
    overflow: auto;
    overscroll-behavior: contain;
    padding-bottom: var(--footer-h); /* last rows not hidden */
    scrollbar-gutter: stable both-edges; /* avoid layout jump */
}

@supports (height: 100dvh) {
    #form-container {
        height: calc(100dvh - var(--footer-h) - var(--form-top));
    }
}

/* Keep the vertical padding tame */
#form-container.container-p-y {
    padding-top: var(--g) !important;
    padding-bottom: var(--g) !important;
}

.my-tooltip {
    position: fixed;
    z-index: 2000;
    pointer-events: none;
    background: rgba(33,37,41,.95);
    color: #fff;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 120ms ease;
}

.my-tooltip.show {
    opacity: 1;
}

.my-tooltip-arrow {
    position: absolute;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: inherit;
}
/* Keep panels free so children can fly out */
.menu-horizontal .menu-sub {
    overflow: visible;
    will-change: transform;
}

/* Optional: avoid animated jumping */
.menu-horizontal .menu-sub {
    transition: transform 2s !important;
}

/* Wrapper spacing */
pager {
    display: block;
}

.pagination-control {
    padding-bottom: 10px;
}

/* Layout */
.pagination {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    margin: 0;
    list-style: none;
}

    /* Kill Bootstrap spacing */
    .pagination .page-item,
    .pagination .page-link {
        margin: 0 !important;
    }

        .pagination .page-item + .page-item {
            margin-left: 2px !important; /* tighten spacing */
        }

    /* Reset any inline image styles from old pager */
    .pagination .page-item {
        background: none !important;
        background-image: none !important;
        padding: 0 !important;
    }

    /* Chip base */
    .pagination .page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 32px;
        height: 32px;
        padding: 0 8px;
        border-radius: 10px;
        border: 1px solid #cbd5e1; /* stronger base border */
        background: #f9fafb;
        color: #4b5563;
        text-decoration: none;
        line-height: 1;
        transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease, transform .02s ease;
        box-shadow: 0 1px 1px rgba(0,0,0,.04);
    }

    /* Make First/Last borders unambiguously visible */
    .pagination .page-item:first-child .page-link,
    .pagination .page-item:last-child .page-link {
        border-color: #94a3b8 !important; /* force it */
    }

    /* Hover — much higher contrast */
    .pagination .page-link:hover {
        background: #e0e7ff; /* deeper tint */
        border-color: #6366f1;
        color: #111827;
        box-shadow: 0 2px 6px rgba(99,102,241,.28);
    }

    /* Pressed */
    .pagination .page-link:active {
        transform: translateY(1px);
    }

    /* Focus ring */
    .pagination .page-link:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(99,102,241,.35);
    }

    /* Active/current page */
    .pagination .page-item.active .page-link {
        background: #6366f1;
        border-color: #6366f1 !important;
        color: #fff;
        box-shadow: 0 6px 12px rgba(99,102,241,.35);
        cursor: default;
    }

    /* Disabled (if you use it) */
    .pagination .page-item.disabled .page-link {
        background: #f3f4f6;
        border-color: #e5e7eb !important;
        color: #9aa4b2;
        opacity: .9;
        pointer-events: none;
    }

/* =========== Compact Select2 when the SOURCE <select> has .inline-dropdown-container =========== */
/* The Select2 container is inserted RIGHT AFTER the <select>, so we use the adjacent sibling (+) */
.inline-dropdown-container + .select2 .select2-selection--single {
    height: 22px !important;
    min-height: 22px !important;
    line-height: 22px !important;
    font-size: 12px !important;
    padding: 0 22px 0 6px !important; /* room for clear & arrow */
    box-sizing: border-box;
}

/* Rendered text */
.inline-dropdown-container + .select2 .select2-selection__rendered {
    font-size: 12px !important;
    line-height: 22px !important;
    padding-right: 22px !important; /* avoid overlap with arrow/clear */
    margin: 0 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Placeholder text */
.inline-dropdown-container + .select2 .select2-selection__placeholder {
    font-size: 12px !important;
    line-height: 22px !important;
}

/* Clear (×) button */
.inline-dropdown-container + .select2 .select2-selection__clear {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    line-height: 1;
    font-size: 12px !important;
    cursor: pointer;
}

/* Arrow */
.inline-dropdown-container + .select2 .select2-selection__arrow {
    position: absolute;
    right: 4px;
    top: 0;
    height: 22px !important;
    width: 16px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Optional: tighten the container width if needed (your inline style is already 300px) */
.inline-dropdown-container + .select2 {
    max-width: 300px; /* keep in sync with your inline style */
}

/* put this on the scrolling container that holds the big table */
.big-table-wrap {
    content-visibility: auto; /* skip layout/paint off-screen */
    contain-intrinsic-size: 1200px; /* reserve space so scrolling works smoothly */
}

.password-wrap {
    position: relative;
}

.password-wrap input.form-control {
    padding-right: 2.25rem;
}
/* room for the icon */
.password-toggle {
    position: absolute;
    right: .5rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    opacity: .7;
}

.password-toggle:hover, .password-toggle:focus {
    opacity: 1;
}

.password-toggle svg {
    width: 1.1rem;
    height: 1.1rem;
}

/* Container forces full table width and prevents resizing */
.pcg-pager-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Spreads sections to left, center, right */
    padding: 8px 15px;
    background-color: transparent;
    border-top: 1px solid #dee2e6;
}

.pcg-pager-section {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* Force the bar to be a static size regardless of content */
.pcg-pager-container .pagination {
    display: flex;
    justify-content: center;
    width: 100%;
}

.pcg-pager-container .page-item {
    flex: 0 0 auto;
}

.pcg-pager-container .pagination .page-link {
    width: 38px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

/* Ensure Prev/Next have their own fixed width */
.pcg-pager-container .page-item:nth-child(2) .page-link,
.pcg-pager-container .page-item:nth-last-child(2) .page-link {
    width: 60px;
}
/* Ensure the '...' ellipsis item also has a fixed width */
.pcg-pager-container .page-item.disabled .page-link {
    min-width: 35px;
}