/* ============================================================
   VENDOR PANEL — AI CHAT WIDGET STYLES
   Registered via FilamentAsset in VendorPanelProvider (plain CSS,
   no build step). The Filament panel doesn't load the public site's
   layout (public/css/grainhouse.css), so partials/chat-widget.blade.php
   — rendered here via a BODY_END render hook — had no CSS at all in
   this panel and fell back to raw unstyled HTML. These are the same
   .gh-chat* rules from grainhouse.css, scoped under body.fi-panel-vendor
   and using the shared --gh-* variables from vendor-panel-theme.css
   so both files must stay registered together.
   ============================================================ */

body.fi-panel-vendor .gh-chat-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--gh-accent);
    color: #fff;
    border: 0;
    cursor: pointer;
    box-shadow: 0 8px 28px rgba(217, 83, 30, .4);
    display: grid;
    place-items: center;
    font-size: 26px;
    z-index: 9998;
    transition: .2s;
}

body.fi-panel-vendor .gh-chat-bubble:hover {
    transform: scale(1.06);
}

body.fi-panel-vendor .gh-chat-bubble .gh-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: var(--gh-accent-2);
    border: 2px solid var(--gh-paper);
    border-radius: 50%;
}

body.fi-panel-vendor .gh-chat {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 520px;
    max-height: calc(100vh - 130px);
    background: var(--gh-white);
    border-radius: 16px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    border: 1px solid var(--gh-line);
}

body.fi-panel-vendor .gh-chat.open {
    display: flex;
}

body.fi-panel-vendor .gh-head {
    background: var(--gh-walnut);
    color: var(--gh-kraft);
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

body.fi-panel-vendor .gh-head .av {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--gh-accent);
    display: grid;
    place-items: center;
    font-size: 18px;
    color: #fff;
}

body.fi-panel-vendor .gh-head h4 {
    font-family: 'Fraunces', serif;
    font-size: 16px;
    color: #fff;
}

body.fi-panel-vendor .gh-head .st {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: var(--gh-accent-2);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 2px;
}

body.fi-panel-vendor .gh-head .st::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gh-accent-2);
}

body.fi-panel-vendor .gh-head .x {
    margin-left: auto;
    background: transparent;
    border: 0;
    color: var(--gh-kraft);
    font-size: 20px;
    cursor: pointer;
    opacity: .7;
}

body.fi-panel-vendor .gh-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--gh-paper);
}

body.fi-panel-vendor .gh-msg {
    max-width: 82%;
    padding: 11px 14px;
    border-radius: 14px;
    font-size: 13.5px;
    line-height: 1.5;
}

body.fi-panel-vendor .gh-msg.bot {
    background: var(--gh-white);
    border: 1px solid var(--gh-line);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    color: var(--gh-ink);
}

body.fi-panel-vendor .gh-msg.user {
    background: var(--gh-accent);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

body.fi-panel-vendor .gh-msg a {
    color: var(--gh-accent);
    font-weight: 600;
}

body.fi-panel-vendor .gh-msg.bot ul {
    margin: 8px 0 0 16px;
    font-size: 13px;
}

body.fi-panel-vendor .gh-msg.bot li {
    margin-bottom: 4px;
}

body.fi-panel-vendor .gh-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 0 16px 12px;
    background: var(--gh-paper);
}

body.fi-panel-vendor .gh-chip {
    background: var(--gh-white);
    border: 1px solid var(--gh-line);
    border-radius: 16px;
    padding: 7px 13px;
    font-size: 12px;
    cursor: pointer;
    color: var(--gh-walnut);
    transition: .15s;
}

body.fi-panel-vendor .gh-chip:hover {
    background: var(--gh-kraft);
    border-color: var(--gh-accent);
}

body.fi-panel-vendor .gh-foot {
    padding: 12px;
    border-top: 1px solid var(--gh-line);
    display: flex;
    gap: 8px;
    background: var(--gh-white);
}

body.fi-panel-vendor .gh-foot input {
    flex: 1;
    border: 1px solid var(--gh-line);
    border-radius: 10px;
    padding: 11px 13px;
    font-family: 'Archivo', sans-serif;
    font-size: 13.5px;
    outline: none;
}

body.fi-panel-vendor .gh-foot input:focus {
    border-color: var(--gh-accent);
}

body.fi-panel-vendor .gh-foot button {
    background: var(--gh-accent);
    color: #fff;
    border: 0;
    border-radius: 10px;
    width: 44px;
    cursor: pointer;
    font-size: 16px;
}

body.fi-panel-vendor .gh-wa {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px;
    background: #25D366;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

body.fi-panel-vendor .gh-typing {
    display: flex;
    gap: 4px;
    padding: 12px 14px;
}

body.fi-panel-vendor .gh-typing span {
    width: 7px;
    height: 7px;
    background: #c0b0a0;
    border-radius: 50%;
    animation: gh-panel-typing-blink 1.2s infinite;
}

body.fi-panel-vendor .gh-typing span:nth-child(2) {
    animation-delay: .2s;
}

body.fi-panel-vendor .gh-typing span:nth-child(3) {
    animation-delay: .4s;
}

@keyframes gh-panel-typing-blink {
    0%, 60%, 100% { opacity: .3; }
    30% { opacity: 1; }
}

@media (max-width: 480px) {
    body.fi-panel-vendor .gh-chat {
        right: 12px;
        left: 12px;
        width: auto;
        bottom: 88px;
    }
}
