/* 
 * Dropdown Width Fix
 * Prevents dropdowns from causing horizontal scroll and white space
 */

/* Global overflow control */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Layout containers overflow fix */
.layout-wrapper,
.layout-container,
.layout-page,
.content-wrapper {
    overflow-x: hidden;
    max-width: 100%;
}
/* Navbar dropdown fix - prevent clipping */
.layout-navbar,
.navbar,
.navbar-nav,
.nav-item.dropdown {
    overflow: visible !important;
}
/* Bootstrap dropdown fixes */
.dropdown-menu {
    max-width: calc(100vw - 40px) !important;
    box-sizing: border-box;
    transform: none !important;
}

/* Select2 dropdown fixes */
.select2-container {
    width: 100% !important;
    max-width: 100% !important;
}

.select2-dropdown {
    max-width: calc(100vw - 40px) !important;
    box-sizing: border-box;
    z-index: 9999 !important;
}

/* Form select fixes */
.form-select {
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Card and container fixes */
.card {
    overflow-x: hidden;
}

.container-xxl,
.container-xl,
.container-lg,
.container-md,
.container-sm,
.container {
    overflow-x: hidden;
    max-width: 100%;
}

/* Row fixes */
.row {
    margin-left: 0;
    margin-right: 0;
    max-width: 100%;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .select2-dropdown {
        max-width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
    }
    
    .dropdown-menu {
        max-width: calc(100vw - 20px) !important;
    }
}