/* Fix permanent scroll issue - Balance between full screen and no scroll */

/* Dashboard container should fill the viewport minus header */
.dashboard-container {
    min-height: calc(100vh - 55px) !important;
    height: auto !important;
    overflow: hidden !important;
}

.dashboard-content-container {
    min-height: calc(100vh - 55px) !important;
    height: calc(100vh - 55px) !important;
    overflow: hidden !important;
}

/* Content inner should NOT have min-height to allow internal containers to control scrolling */
.dashboard-content-inner {
    min-height: 0 !important;
    height: 100% !important;
    overflow: auto !important;
}

/* Action tab container (chat pages) should fill available space without bottom padding for fixed input */
.action-tab-container {
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    padding-bottom: 140px !important; /* Space for fixed input */
}

.chat-container {
    height: 100% !important;
    position: relative !important;
}

/* Messages container takes all available space and scrolls */
.action-tab-container .messages-container {
    height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding-bottom: 20px !important;
}

/* Input container fixed at bottom like progress banner */
.action-tab-container .input-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 63px !important; /* sidebar width */
    right: 0 !important;
    z-index: 100 !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
}


@media (max-width: 768px) {
    .action-tab-container .input-container {
        left: 0px !important; /* no sidebar */
    }
}

/* Ensure spinner doesn't add excessive padding */
.spinner-above {
    padding-bottom: 0 !important;
}

/* Let content dictate height naturally, no forced padding */
#dsqd, #dsddsqd {
    padding-bottom: 0 !important;
}
