.modal-footer {
    justify-content: flex-start !important;
}

.date-time-field.form-control>input {
    margin: .25rem !important;
    border: none !important;
    box-shadow: 0 0 0 0 transparent !important;
    display: block
}

.svelte-select.form-control {
    border-radius: var(--border-radius, .25rem) !important;
    min-height: var(--height, 38px) !important;
}

.message-list li {
    line-height: normal !important;
    cursor: pointer !important;
}

.chat-conversation.chat-250 {
    height: calc(100vh - 250px) !important;
}

.chat-conversation.chat-custom {
    height: calc(100vh - 234px) !important;
}


/* Override twocolumn layout untuk full width content - COMPLETELY HIDE SIDEBAR */
[data-layout=twocolumn] .main-content {
    margin-left: 0 !important;
}

[data-layout=twocolumn] #page-topbar,
[data-layout=twocolumn] .footer {
    left: 0 !important;
}

/* Hide sidebar completely in twocolumn layout */
[data-layout=twocolumn] .app-menu {
    display: none !important;
}

[data-layout=twocolumn] .navbar-menu {
    display: none !important;
}

[data-layout=twocolumn] .twocolumn-iconview {
    display: none !important;
}

/* Incoming call overlay positioning - below header */
.incoming-call-overlay {
    position: fixed !important;
    top: 70px !important; /* Below header */
    left: 0 !important;
    right: 0 !important;
    background: transparent !important;
}
/* Main content adjustment when incoming call is active */
.incoming-call-active .main-content {
    margin-top: 120px !important; /* Space for incoming call card */
    transition: margin-top 0.3s ease !important;
}

/* Default main content positioning */
.main-content {
    transition: margin-top 0.3s ease !important;
}

/* Fix dropdown menu z-index and positioning issues */
.header-sidebar-menu .dropdown-menu {
    z-index: 1060 !important; /* Higher than incoming call overlay */
    position: absolute !important;
}

.header-sidebar-menu .dropdown {
    position: relative !important;
}

/* Ensure dropdown menu items are clickable */
.header-sidebar-menu .dropdown-menu .dropdown-item {
    pointer-events: auto !important;
    z-index: 1061 !important;
}

/* Fix menu item container positioning */
.header-sidebar-menu .menu-item-container {
    position: relative !important;
    z-index: 1050 !important;
}

/* Fix CustomSelect dropdown clipping issues */
.custom-select-wrapper {
    position: relative !important;
    z-index: 1000 !important;
}

/* Ensure svelte-select dropdown appears above other elements */
.svelte-select .svelte-select-list {
    z-index: 9999 !important;
    position: absolute !important;
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    max-height: 200px !important;
    overflow-y: auto !important;
}

/* Prevent parent containers from clipping dropdowns */
.card {
    overflow: visible !important;
}

.card-body {
    overflow: visible !important;
}

/* Ensure form containers don't clip dropdowns */
.form-control {
    position: relative !important;
}

/* Fix for position-relative containers */
.position-relative {
    z-index: auto !important;
}

/* SimpleBar validation fix */
[data-simplebar] {
    position: relative;
}

/* Ensure SimpleBar elements are properly initialized */
.simplebar-content-wrapper {
    position: relative;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    [data-layout=twocolumn] .main-content {
        margin-left: 0 !important;
    }
    
    [data-layout=twocolumn] #page-topbar,
    [data-layout=twocolumn] .footer {
        left: 0 !important;
    }
    
    .incoming-call-active .main-content {
        margin-top: 140px !important; /* Slightly more space on mobile */
    }
}

@media (max-width: 575.98px) {
    [data-layout=twocolumn] .main-content {
        margin-left: 0 !important;
    }
    
    [data-layout=twocolumn] #page-topbar,
    [data-layout=twocolumn] .footer {
        left: 0 !important;
    }
    
    .incoming-call-active .main-content {
        margin-top: 160px !important; /* Even more space on small mobile */
    }
}