/* ------------------------------------------------------------------
   Guest chat (/chat) - loaded after agent-chat.css and reuses its
   bubbles, composer, viewer, notifications. Only the guest-specific
   parts live here: site menu, header brand, auth buttons, news list.
   Desktop : menu | chat | news
   < 1200  : news = drawer        < 992 : menu = drawer too
   ------------------------------------------------------------------ */
:root {
    --gc-menu-w: 280px;
}

/* ---------- Site menu ---------- */
.gc-menu {
    flex: 0 0 var(--gc-menu-w);
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--bc-surface);
    border-right: 1px solid var(--bc-border);
}
.gc-menu-head {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 10px 0 20px;
    border-bottom: 1px solid var(--bc-border);
}
.gc-logo img {
    display: block;
    width: auto;
    height: 34px;
    max-width: 170px;
}
.gc-menu-head .toggle-menu {
    display: none;
}
.gc-nav {
    flex: 1;
    min-height: 0;
    padding: 12px 10px calc(16px + var(--bc-safe-b));
}
.gc-nav .navbar-nav,
.gc-nav .nav {
    gap: 2px;
}
.gc-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--bc-text);
    font-size: .9375rem;
    font-weight: 500;
    transition: background-color .15s, color .15s;
}
.gc-nav .nav-link:hover,
.gc-nav .nav-link:focus-visible {
    background: var(--bc-primary-soft);
    color: var(--bc-primary);
}
.gc-nav .nav-link > i {
    color: var(--bc-muted);
}
.gc-nav .nav-link:hover > i {
    color: inherit;
}
.gc-nav .gc-nav-group {
    justify-content: space-between;
    margin-top: 8px;
    color: var(--bc-muted);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.gc-nav .gc-nav-group i {
    font-size: .75rem;
    transition: transform .2s;
}
.gc-nav .gc-nav-group[aria-expanded="false"] i {
    transform: rotate(-90deg);
}
.gc-nav .nav .nav-link {
    font-size: .875rem;
}
.gc-backdrop {
    display: none;
}
.gc-menu-btn {
    display: none;
}

/* ---------- Header ---------- */
.gc-brand {
    flex: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(160deg, #8a8df9, var(--bc-primary));
    color: #fff;
    font-size: 1.125rem;
}
.gc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    margin-left: 6px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: .8125rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color .15s, color .15s, filter .15s;
}
.gc-btn-ghost {
    background: var(--bc-bg);
    color: var(--bc-text);
}
.gc-btn-ghost:hover {
    background: var(--bc-primary-soft);
    color: var(--bc-primary);
}
.gc-btn-primary,
.gc-btn-primary:hover {
    background: var(--bc-primary);
    color: #fff;
}
.gc-btn-primary:hover {
    filter: brightness(1.08);
}

/* ---------- Incoming call (Zoom) ---------- */
.video-call-container {
    flex: none;
    padding: 12px 20px;
    background: var(--bc-surface);
    border-bottom: 1px solid var(--bc-border);
    text-align: center;
}

/* ---------- Rich answers (forms, components) get more room ---------- */
.msg-item-container:has(.component-container) {
    max-width: min(92%, 720px);
}
.component-container {
    min-width: min(320px, 68vw);
}
.enet-link {
    color: var(--bc-primary);
    cursor: pointer;
    text-decoration: underline;
}
.enet-link-clicked {
    color: var(--bc-muted);
}

/* ---------- News ---------- */
.gc-news-list {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 10px calc(16px + var(--bc-safe-b));
}
.gc-news-list:empty::after {
    content: "No news yet";
    padding: 40px 16px;
    color: var(--bc-muted);
    font-size: .875rem;
    text-align: center;
}
.gc-news {
    flex: none;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    color: var(--bc-text);
    text-decoration: none;
    transition: background-color .15s;
}
.gc-news:hover,
.gc-news:focus-visible {
    background: var(--bc-bg);
    color: var(--bc-text);
}
.gc-news-date {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    background: var(--bc-primary-soft);
    color: var(--bc-primary);
    line-height: 1.1;
}
.gc-news-date b {
    font-size: 1rem;
}
.gc-news-date span {
    font-size: .625rem;
    font-weight: 700;
    text-transform: uppercase;
}
.gc-news-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gc-news-title {
    font-size: .875rem;
    font-weight: 600;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gc-news:hover .gc-news-title {
    color: var(--bc-primary);
}
.gc-news-text {
    color: var(--bc-muted);
    font-size: .8125rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- < 992px: the site menu becomes a drawer ---------- */
@media (max-width: 991.98px) {
    .gc-menu {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1041;
        width: min(300px, 86vw);
        border-right: 0;
        box-shadow: 16px 0 48px rgba(22, 25, 44, .18);
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform .25s ease, visibility .25s;
    }
    body.gc-menu-open .gc-menu {
        transform: none;
        visibility: visible;
    }
    .gc-menu-head .toggle-menu,
    .gc-menu-btn {
        display: inline-flex;
    }
    .gc-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1040;
        display: block;
        background: rgba(22, 25, 44, .4);
        opacity: 0;
        pointer-events: none;
        transition: opacity .25s;
    }
    body.gc-menu-open .gc-backdrop {
        opacity: 1;
        pointer-events: auto;
    }
}
@media (max-width: 767.98px) {
    /* keep the header on one line: no brand badge, icon-only logout */
    .gc-brand {
        display: none;
    }
    .gc-btn {
        height: 34px;
        margin-left: 4px;
        padding: 0 11px;
    }
    .gc-btn-ghost span {
        display: none;
    }
}
@media (prefers-reduced-motion: reduce) {
    .gc-menu,
    .gc-backdrop {
        transition: none;
    }
}
