/*
* demo.css
* File include item demo only specific css only
******************************************************************************/

.menu .app-brand.demo {
    height: 64px;
    margin-top: 12px;
}

.app-brand-logo.demo svg {
    width: 22px;
    height: 38px;
}

.app-brand-text.demo {
    font-size: 1.75rem;
    letter-spacing: -0.5px;
}

/* ! For .layout-navbar-fixed added fix padding top to .layout-page */
/* Detached navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-horizontal):not(.layout-without-menu) .layout-page {
    padding-top: 74px !important;
}

/* Default navbar */
.layout-navbar-fixed .layout-wrapper:not(.layout-without-menu) .layout-page {
    padding-top: 64px !important;
}

.docs-page .layout-navbar-fixed.layout-wrapper:not(.layout-without-menu) .layout-page,
.docs-page .layout-menu-fixed.layout-wrapper:not(.layout-without-menu) .layout-page {
    padding-top: 62px !important;
}

/* Navbar page z-index issue solution */
.content-wrapper .navbar {
    z-index: auto;
}

/*
  * Content
  ******************************************************************************/

.demo-blocks>* {
    display: block !important;
}

.demo-inline-spacing>* {
    margin: 1rem 0.375rem 0 0 !important;
}

/* ? .demo-vertical-spacing class is used to have vertical margins between elements. To remove margin-top from the first-child, use .demo-only-element class with .demo-vertical-spacing class. For example, we have used this class in forms-input-groups.html file. */
.demo-vertical-spacing>* {
    margin-top: 1rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing.demo-only-element> :first-child {
    margin-top: 0 !important;
}

.demo-vertical-spacing-lg>* {
    margin-top: 1.875rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing-lg.demo-only-element> :first-child {
    margin-top: 0 !important;
}

.demo-vertical-spacing-xl>* {
    margin-top: 5rem !important;
    margin-bottom: 0 !important;
}

.demo-vertical-spacing-xl.demo-only-element> :first-child {
    margin-top: 0 !important;
}

/* Dropdown buttons going out of small screens */
@media (max-width: 576px) {
    #dropdown-variation-demo .btn-group .text-truncate {
        width: 231px;
        position: relative;
    }

    #dropdown-variation-demo .btn-group .text-truncate::after {
        position: absolute;
        top: 45%;
        right: 0.65rem;
    }


    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter,
    .dataTables_wrapper .dt-buttons {
        margin-bottom: 5px;
    }
}

/*
  * Layout demo
  ******************************************************************************/

.layout-demo-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    margin-top: 1rem;
}

.layout-demo-placeholder img {
    width: 900px;
}

.layout-demo-info {
    text-align: center;
    margin-top: 1rem;
}

/* Highlight when selected */
.dt-button.dt-button-active {
    background-color: #e0e0e0 !important;
    /* Example highlight color */
    border-color: #bbb !important;
    color: #333;
}

/* Additional styles for deselected state */
.dt-button:not(.dt-button-active) {
    background-color: #fff !important;
    border-color: #ccc !important;
    color: #555;
}

table.dataTable th {
    border-top: 1px solid #e5e6e8 !important;
}

.dt-wrap {
    white-space: normal !important;
    word-break: break-word;
}

.highlight {
    background-color: yellow;
    font-weight: bold;
}

.tab-content:not(.doc-example-content) .tab-pane {
    opacity: initial;
}

#overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 2;
    cursor: pointer;
}

#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 16px solid #f3f3f3;
    border-top: 16px solid #3498db;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    animation: spin 2s linear infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

.notification-item:hover {
    background-color: #f8f9fa !important;
    border-left: 3px solid #696cff !important;
}

.dropdown-menu {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border: 1px solid #e5e5e5;
}

.notifications-container {
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
}

.notifications-container::-webkit-scrollbar {
    width: 3px;
}

.notifications-container::-webkit-scrollbar-track {
    background: transparent;
}

.notifications-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.notifications-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

@media (min-width: 1200px) {
    .navbar-expand-xl .navbar-nav .dropdown-menu {
        margin-left: -120px;
    }
}

/* Mobile notification dropdown positioning */
@media (max-width: 1199.98px) {
    .navbar-nav .dropdown-menu {
        position: fixed !important;
        top: 60px !important;
        right: 10px !important;
        left: auto !important;
        width: calc(100vw - 20px) !important;
        max-width: 350px !important;
        z-index: 1060 !important;
        margin: 0 !important;
        transform: none !important;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
    }

    .navbar-nav .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    /* Ensure notification button is clickable on mobile */
    .nav-item .btn.header-item {
        position: relative !important;
        z-index: 1061 !important;
        touch-action: manipulation !important;
    }

    /* Ensure topbar has proper z-index */
    .layout-navbar {
        z-index: 1055 !important;
    }

    /* Mobile dropdown backdrop */
    .dropdown-backdrop {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1059;
    }
}

/* Mobile menu overlay and positioning */
@media (max-width: 1199.98px) {

    /* Mobile menu - hidden by default */
    .layout-menu {
        position: fixed !important;
        top: 0;
        left: 0;
        width: 260px !important;
        height: 100vh;
        z-index: 1041;
        transform: translateX(-100%);
        transition: transform 0.25s ease-in-out;
    }

    /* Show menu when expanded */
    .layout-menu-expanded .layout-menu {
        transform: translateX(0) !important;
    }

    /* Mobile overlay */
    .layout-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
        opacity: 0;
        transition: opacity 0.25s ease-in-out;
        pointer-events: none;
    }

    /* Show overlay when menu is expanded */
    .layout-menu-expanded .layout-overlay {
        display: block !important;
        opacity: 1 !important;
        pointer-events: all !important;
    }

    /* Adjust main content on mobile */
    .layout-page {
        margin-left: 0 !important;
        width: 100% !important;
    }

    /* Reset desktop collapsed styles on mobile */
    .layout-menu-collapsed .layout-menu {
        width: 260px !important;
        transform: translateX(-100%) !important;
    }
}

/* Desktop styles */
@media (min-width: 1200px) {

    /* Normal expanded menu */
    .layout-menu {
        width: 260px;
        position: relative;
        transform: none;
        transition: width 0.25s ease-in-out;
    }

    /* Collapsed menu on desktop */
    .layout-menu-collapsed .layout-menu {
        width: 70px !important;
    }

    /* Hide overlay on desktop */
    .layout-overlay {
        display: none !important;
    }

    /* Adjust main content when menu is collapsed */
    .layout-menu-collapsed .layout-page {
        margin-left: 70px;
    }
}

/* App brand responsive styling */
.app-brand {
    display: flex;
    align-items: center;
    padding: 1rem;
    min-height: 60px;

}

.app-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.app-brand img {
    max-height: 32px;
    width: auto;
    object-fit: contain;
    display: none;
}

/* Desktop app brand */
@media (min-width: 1200px) {
    .app-brand {
        justify-content: space-between;
    }

    .app-brand img {
        display: block;
    }
}

/* Mobile app brand */
@media (max-width: 1199.98px) {
    .app-brand {
        justify-content: space-between;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }
}

/* Menu toggle button animations */
.layout-menu-toggle .bx-chevron-left {
    transition: transform 0.25s ease-in-out;
}

.layout-menu-collapsed .layout-menu-toggle .bx-chevron-left {
    transform: rotate(180deg);
}

/* Custom menu scrolling */
.layout-menu .menu-inner.menu-scrollable,
.menu-inner.menu-scrollable {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.layout-menu .menu-inner.menu-scrollable::-webkit-scrollbar,
.menu-inner.menu-scrollable::-webkit-scrollbar {
    width: 4px;
}

.layout-menu .menu-inner.menu-scrollable::-webkit-scrollbar-track,
.menu-inner.menu-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.layout-menu .menu-inner.menu-scrollable::-webkit-scrollbar-thumb,
.menu-inner.menu-scrollable::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.layout-menu .menu-inner.menu-scrollable::-webkit-scrollbar-thumb:hover,
.menu-inner.menu-scrollable::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}