/* Chat-type main page (chat-API spec REQ-007a), laid out as Ksentra's home:
   - >= 1024px: a left sidebar is the only navigation; the site's top navbar is hidden;
   - below that: the navbar stays, no sidebar.
   The footer is left out by home/home_page.html itself.

   Loaded only by the chat page, but Turbo keeps a stylesheet in <head> after a visit to another
   page, so every rule that touches shared elements (the navbar, the back-to-top button) is scoped
   to a page that contains .chat-layout. Plain CSS on purpose: no Sass rebuild needed.
   Colors and radii come from the theme's variables (Velzon --vz-*), with fallbacks. */

.chat-layout {
    display: flex;
    min-height: 100vh;
    min-height: 100dvh;
}

.chat-sidebar {
    display: none;
}

.chat-content {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.chat-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    /* the navbar is fixed on narrow screens; clear it */
    height: 100vh;
    height: 100dvh;
    min-height: 560px;
    padding: 80px 16px 16px;
}

.chat-page__title {
    max-width: 780px;
    margin: 16px 0 8px;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
}

.chat-page__intro {
    max-width: 640px;
    margin-bottom: 8px;
    color: var(--vz-secondary-color, #878a99);
    text-align: center;
}

.chat-page__intro > :last-child {
    margin-bottom: 0;
}

.chat-page__container {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    max-width: 780px;
}

.chat-page__noscript {
    max-width: 640px;
    margin: 24px auto;
    text-align: center;
}

.chat-about {
    width: 100%;
    border-top: 1px solid var(--vz-border-color, #e9ebec);
}

/* The back-to-top button belongs to the long landing, not to a one-screen chat. */
.layout-wrapper:has(.chat-layout) #back-to-top {
    display: none !important;
}

@media (min-width: 1024px) {
    .layout-wrapper:has(.chat-layout) #navbar {
        display: none;
    }

    .chat-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        gap: 20px;
        width: 272px;
        flex-shrink: 0;
        padding: 20px 16px;
        background: var(--vz-light, #f3f6f9);
        border-right: 1px solid var(--vz-border-color, #e9ebec);
        overflow-y: auto;
    }

    .chat-sidebar__logo {
        padding: 8px 14px;
    }

    .chat-sidebar__new-chat {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 0 14px;
        border-radius: 8px;
        background: var(--vz-secondary-bg, #fff);
        border: 1px solid var(--vz-border-color, #e9ebec);
        color: var(--vz-body-color, #212529);
        font-weight: 500;
    }

    .chat-sidebar__nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .chat-sidebar__nav a {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 44px;
        padding: 0 14px;
        border-radius: 8px;
        color: var(--vz-body-color, #212529);
    }

    .chat-sidebar__nav i,
    .chat-sidebar__new-chat i {
        font-size: 1.15rem;
        color: var(--vz-secondary-color, #878a99);
    }

    .chat-sidebar__nav a:hover,
    .chat-sidebar__new-chat:hover {
        background: var(--vz-secondary-bg, #fff);
        color: var(--vz-primary, #405189);
    }

    .chat-sidebar__spacer {
        flex-grow: 1;
    }

    .chat-sidebar__legal {
        display: flex;
        flex-wrap: wrap;
        gap: 6px 12px;
        padding: 0 8px;
        font-size: 0.75rem;
        line-height: 1.4;
    }

    .chat-sidebar__legal a {
        color: var(--vz-secondary-color, #878a99);
    }

    .chat-sidebar__legal a:hover {
        color: var(--vz-primary, #405189);
    }

    .chat-page {
        padding: 0 clamp(16px, 4vw, 48px) 24px;
    }

    .chat-page__title {
        margin-top: 48px;
    }
}
