﻿/* ============================================================
   GLOBAL ADMIN FIXES
   Fix: Dropdowns inside Tabler tables/cards clipping or misaligned
   ============================================================ */

/* Allow dropdowns and popovers inside tables and cards to overflow */
.table-responsive,
.card,
.table,
.table > tbody > tr,
.table > tbody > tr > td {
    overflow: visible;
    transform: none !important;
    position: static !important;
}

    /* Fix dropdown clipping — scoped ONLY to tables and cards */
    .table-responsive .dropdown-menu,
    .card .dropdown-menu,
    .table .dropdown-menu {
        position: fixed !important;
        z-index: 5000 !important;
        inset: auto !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        min-width: 10rem;
        margin-top: 0.25rem !important;
    }

/* Restore normal dropdowns for navbar, header, and user menu */
.navbar .dropdown-menu,
.nav-item .dropdown-menu,
.user-menu .dropdown-menu {
    position: absolute !important;
    z-index: 1050 !important;
    transform: none !important;
}

/* Dark mode consistency for dropdowns */
html[data-bs-theme="dark"] .dropdown-menu {
    background-color: var(--tblr-bg-surface) !important;
    color: var(--tblr-body-color) !important;
    border: 1px solid var(--tblr-border-color) !important;
}

.dropdown-menu .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* ============================================================
   OPTIONAL: Modal & Quill Editor z-index alignment
   ============================================================ */

/* Ensure modals always sit above dropdowns, editors, etc. */
.modal {
    z-index: 6000 !important;
}

/* Quill editor dropdowns and tooltips */
.ql-tooltip,
.ql-picker-options {
    z-index: 6001 !important;
}

/* Toasts and alerts above modals */
.toast-container {
    z-index: 7000 !important;
}