html,
body {
    height: 100%;
}

:root {
    --chat-sidebar-width: clamp(15rem, 18vw, 20rem);
}

body.chat-page {
    height: 100vh;
    overflow: hidden;
    background-color: var(--bs-tertiary-bg);
}

.chat-screen {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.app-shell {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    overflow: hidden;
}

.sidebar-drawer {
    --bs-offcanvas-width: var(--chat-sidebar-width);
    width: var(--chat-sidebar-width);
    flex: 0 0 var(--chat-sidebar-width);
    height: 100%;
}

.sidebar-drawer .offcanvas-body {
    display: flex;
    height: 100%;
    overflow: hidden;
}

.sidebar-panel {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    height: 100%;
    overflow: hidden;
}

.sidebar-panel-header,
.sidebar-user {
    flex: 0 0 auto;
}

.sidebar-history {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.chat-list-link {
    background-color: transparent;
}

.chat-list-link.active {
    background-color: var(--bs-primary);
    color: #fff;
}

.chat-main {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background-color: var(--bs-tertiary-bg);
}

.chat-main-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.5rem;
}

.compose-screen {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.compose-screen-inner {
    width: 100%;
    max-width: 54rem;
}

.compose-card {
    border-radius: 1.25rem;
}

.compose-textarea {
    min-height: 16rem;
    resize: vertical;
}

.review-layout {
    max-width: 60rem;
    padding: 1rem 0 2rem;
}

.empty-review-state {
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.case-example-text,
.message-text {
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 991.98px) {
    body.chat-page,
    .chat-screen {
        height: 100dvh;
    }

    .chat-main-scroll {
        padding: 1rem;
    }

    .compose-screen {
        align-items: stretch;
    }

    .compose-textarea {
        min-height: 12rem;
    }
}
