/* SpicyFlow Admin Custom Styles */

[x-cloak] {
    display: none !important;
}

.sidebar {
    min-height: 100vh;
}

.modal-blur {
    backdrop-filter: blur(4px);
}

/* Log detail overlay - always on top, no Bootstrap conflicts */
.log-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ensure log detail modal sits on top of everything */
#modal-log-detail {
    z-index: 99999 !important;
}
#modal-log-detail + .modal-backdrop {
    z-index: 99998 !important;
}

/* Quill Editor Overrides */
.ql-toolbar.ql-snow,
.ql-container.ql-snow {
    border-color: var(--tblr-border-color) !important;
}

.ql-toolbar.ql-snow {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
}

.ql-container.ql-snow {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
}

/* Tab Bar & Scrollbar handling */
.hide-scrollbar::-webkit-scrollbar { 
    display: none; 
}
.hide-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

.nav-pills .nav-link.active { 
    background-color: #206bc4 !important; 
}

/* Sticky layout helpers */
.sticky-top { 
    position: sticky; 
    top: 0; 
    z-index: 1020; 
}

/* Custom transitions and refinements */
.nav-link {
    transition: all 0.2s ease;
}

.card-header-tabs .nav-link.active {
    border-bottom-color: #206bc4;
}

/* Sidebar Toggle & Collapse Styles */
.sidebar {
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease !important;
    overflow-x: hidden !important;
}

.sidebar .nav-link-title, 
.sidebar .brand-full {
    white-space: nowrap !important;
}

.page-wrapper {
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

@media (min-width: 992px) {
    /* Desktop Sidebar width settings */
    .sidebar {
        width: 250px !important;
    }
    
    .sidebar.sidebar-collapsed {
        width: 70px !important;
    }
    
    .page-wrapper {
        margin-left: 250px !important;
    }
    
    .page-wrapper.content-expanded {
        margin-left: 70px !important;
    }
    
    /* Collapsed Brand refinements */
    .sidebar.sidebar-collapsed .brand-full {
        display: none !important;
    }
    
    .sidebar.sidebar-collapsed .brand-collapsed {
        display: inline-block !important;
        text-align: center;
        width: 100%;
    }
    
    .sidebar.sidebar-collapsed .navbar-brand {
        padding: 1.5rem 0 !important;
        justify-content: center !important;
        display: flex !important;
    }

    /* Collapsed Menu Items refinements */
    .sidebar.sidebar-collapsed .nav-link-title {
        display: none !important;
    }
    
    .sidebar.sidebar-collapsed .nav-link {
        justify-content: center !important;
        padding: 0.65rem 0 !important;
        margin: 0.125rem 0.5rem !important;
        border-radius: 6px !important;
    }
    
    .sidebar.sidebar-collapsed .nav-link-icon {
        margin-right: 0 !important;
        font-size: 1.25rem !important;
    }
    
    .sidebar.sidebar-collapsed .navbar-vertical .nav-item.active .nav-link {
        margin: 0.125rem 0.5rem !important;
    }

    /* Collapsed Menu Group Header separators */
    .sidebar.sidebar-collapsed .menu-group-header {
        font-size: 0 !important;
        padding: 0.5rem 0 0.25rem !important;
        justify-content: center !important;
        height: 1px !important;
        border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
        margin: 0.75rem 12px 0.25rem !important;
    }
    
    .sidebar.sidebar-collapsed .menu-group-header::after {
        display: none !important;
    }
    
    .sidebar.sidebar-collapsed .menu-group-header span {
        display: none !important;
    }
    
    .sidebar.sidebar-collapsed .menu-group-header i {
        display: none !important;
    }
}

/* Sidebar Active Item Styling (MDI Style) */
.navbar-vertical .nav-item.active .nav-link {
    background-color: #206bc4 !important;
    color: #ffffff !important;
    border-radius: 6px;
    margin: 0.125rem 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(32, 107, 196, 0.2);
}

.navbar-vertical .nav-item.active .nav-link .nav-link-icon {
    color: #ffffff !important;
}

.navbar-vertical .nav-item.active .nav-link:hover {
    background-color: #1a569d !important;
}

/* Premium Sidebar Refinements */
.sidebar {
    background: #1b2434 !important; /* Deeper, modern dark blue-grey */
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar .navbar-brand {
    padding: 1.5rem 1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.sidebar .nav-link {
    padding: 0.65rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0.125rem 0.75rem;
}

.sidebar .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
}

.sidebar .nav-link-icon {
    opacity: 0.8;
    margin-right: 0.75rem;
}

/* Improved Group Headers */
.sidebar .menu-group-header {
    padding: 1.5rem 1.25rem 0.5rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.sidebar .menu-group-header.cursor-pointer {
    cursor: pointer !important;
    user-select: none;
}

.sidebar .menu-group-header.cursor-pointer:hover {
    color: rgba(255, 255, 255, 0.75) !important;
}

.sidebar .menu-group-header i {
    transition: transform 0.2s ease;
}

.sidebar .menu-group-header::after {
    content: "";
    flex-grow: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin-left: 10px;
}

.cursor-pointer {
    cursor: pointer !important;
}

/* Custom Sidebar Scrollbar */
.sidebar .navbar-collapse::-webkit-scrollbar {
    width: 4px;
}

.sidebar .navbar-collapse::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.sidebar .navbar-collapse::-webkit-scrollbar-track {
    background: transparent;
}

/* Mobile Sidebar Refinements */
@media (max-width: 991.98px) {
    .sidebar.offcanvas-lg {
        background: #1b2434 !important;
        border-right: none;
        box-shadow: 10px 0 30px rgba(0,0,0,0.2);
        visibility: visible; /* Ensure it shows when triggered */
    }
    
    .sidebar.offcanvas-lg:not(.show) {
        transform: translateX(-100%);
    }
    
    .offcanvas-body {
        overflow-y: auto;
    }

    .offcanvas-body::-webkit-scrollbar {
        width: 4px;
    }

    .offcanvas-body::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.1);
        border-radius: 10px;
    }

    .sidebar .nav-link {
        margin: 0.25rem 1rem;
        padding: 0.75rem 1rem;
    }
    
    .btn-close-white {
        position: absolute;
        top: 1.5rem;
        right: 1rem;
        z-index: 10;
    }
}





