/*Following is part of Colvis DataTables, to have a scrollable column dropdown */
div.dt-button-collection {
    max-height: 200px;
    overflow-y: auto;
}
.toggle-switch {
    display: flex;
    align-items: center;
    justify-content: start;
    width: 50px;
    height: 24px;
    background-color: #343a40;
    border-radius: 15px;
    cursor: pointer;
    position: relative;
}
.toggle-switch .switch {
    width: 18px;
    height: 18px;
    background-color: white;
    border-radius: 50%;
    transition: all 0.3s;
}
.toggle-switch.toggle-on .switch {
    transform: translateX(30px);
}
.toggle-switch.toggle-on {
    background-color: #007bff;
}
a.disabled {
  pointer-events: none;
  cursor: default;
}

/* todo, add a table-first-column-fixed-striped rather than single color*/
.table-first-column-fixed tbody td:first-child,
.table-first-column-fixed thead th:first-child {
    position: sticky;
    left: 0;
    z-index: 1050;
    background-color: var(--bs-table-striped-bg);
}


.warning-message {
        margin-top: 20px;
        padding: 10px;
        background-color: #f8d7da;
        color: #721c24;
        border: 1px solid #f5c6cb;
        border-radius: 4px;
    }

.square-25px{
    width: 25px;
    height: 25px;
}

.square-20px{
    width: 20px;
    height: 20px;
}

.overflow-y-scroll{
        overflow-y: scroll !important;
}

.overflow-x-scroll{
        overflow-x: scroll !important;
}

.hide-scrollbar{
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.text-xs{
    font-size:.65rem;
}

.text-xxs{
    font-size:.5rem;
}

td .data-bar-container {
    position: relative;
    width: 100%;
    height: 20px;
}

td .data-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    background-color: #1E90FF;
    transition: width 0.2s;
}

td .data-bar-text {
    position: relative;
    padding-left: 10px;
    color: white;
    font-size: 14px;
    white-space: nowrap;
}

.desktop-nav {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.desktop-nav-container {
    max-width: 100%;
}

.desktop-nav-menu {
    gap: 0;
}

.desktop-nav-link {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s ease;
}

.desktop-nav-link:hover,
.desktop-nav-link:focus,
.desktop-nav-item.show > .desktop-nav-link {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.desktop-nav-item.show > .desktop-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #fff;
}

.desktop-nav-chevron {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.desktop-nav-item.show > .desktop-nav-link .desktop-nav-chevron,
.desktop-nav-item:hover > .desktop-nav-link .desktop-nav-chevron {
    transform: rotate(180deg);
}

.mega-menu {
    top: 100%;
    width: 100vw;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1050;
    display: none;
}

.desktop-nav-item.show .mega-menu {
    display: block;
}

.mega-menu-content {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    max-height: 500px;
}

.mega-menu-column {
    min-width: 180px;
}

.mega-menu-title {
    color: #fff;
    font-size: 0.875rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mega-menu-link {
    color: rgba(255, 255, 255, 0.7);
    padding: 0.375rem 0;
    font-size: 0.875rem;
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mega-menu-link:hover,
.mega-menu-link:focus {
    color: #fff;
    padding-left: 0.5rem;
    background-color: rgba(255, 255, 255, 0.05);
}

.mega-menu-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    padding: 0.5rem 0 0.25rem 0;
}

.mega-menu-sublist {
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mega-menu-sublist .mega-menu-link {
    font-size: 0.8125rem;
    padding: 0.25rem 0.5rem;
    margin-left: -0.5rem;
}

@media (hover: none) and (pointer: coarse) {
    .desktop-nav-link:hover {
        background-color: transparent;
    }
    
    .desktop-nav-item.show .mega-menu {
        display: block;
    }
}

@media (hover: hover) and (pointer: fine) {
    .desktop-nav-item:hover .mega-menu {
        display: block;
    }
    
    .desktop-nav-item:hover .desktop-nav-link {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.1);
    }
}

@media (min-width: 992px) and (max-width: 1200px) {
    .mega-menu {
        width: 100vw;
    }
    
    .mega-menu-content {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .desktop-nav-link {
        padding: 1rem !important;
    }
}
