.hq-chat,
.hq-chat * { box-sizing: border-box; }
.hq-chat {
    --hq-chat-ink: #17222c;
    --hq-chat-muted: #66727d;
    --hq-chat-line: #e4e8eb;
    --hq-chat-accent: #f99a00;
    position: fixed;
    right: 72px;
    bottom: 24px;
    z-index: 10050;
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
    letter-spacing: 0;
}
.hq-chat-panel {
    position: absolute;
    right: -56px;
    bottom: 72px;
    display: flex;
    width: min(390px, calc(100vw - 32px));
    height: min(620px, calc(100vh - 118px));
    min-height: 460px;
    flex-direction: column;
    overflow: hidden;
    overscroll-behavior: contain;
    border: 1px solid rgba(23, 34, 44, .13);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(13, 24, 34, .23), 0 4px 16px rgba(13, 24, 34, .1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.hq-chat.is-open .hq-chat-panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}
.hq-chat-header {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 0 0 76px;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    color: #fff;
    background: var(--hq-chat-ink);
}
.hq-chat-brand { display: flex; min-width: 0; align-items: center; gap: 11px; }
.hq-chat-brand > span:last-child { display: block; min-width: 0; }
.hq-chat-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .24);
    border-radius: 50%;
    background: #fff;
}
.hq-chat-mark img { display: block; width: 30px; height: 30px; object-fit: contain; }
.hq-chat-brand .hq-chat-title {
    display: block !important;
    overflow: visible;
    color: #fff !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    line-height: 1.35 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    white-space: nowrap;
}
.hq-chat-brand small { display: flex; align-items: center; gap: 6px; margin-top: 3px; color: #cbd3d9; font-size: 11px; }
.hq-chat-brand small i { width: 7px; height: 7px; border-radius: 50%; background: #30c878; box-shadow: 0 0 0 3px rgba(48, 200, 120, .14); }
.hq-chat-icon {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
}
.hq-chat-icon:hover { background: rgba(255, 255, 255, .18); }
.hq-chat-body { min-height: 0; flex: 1 1 auto; overflow: hidden; background: #f7f8f9; }
.hq-chat-intro {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 28px 24px 20px;
    -webkit-overflow-scrolling: touch;
}
.hq-chat-intro > img { display: block; width: 142px; height: auto; margin-bottom: 24px; }
.hq-chat-intro h2 { margin: 0 0 7px; color: var(--hq-chat-ink); font-size: 22px; font-weight: 750; line-height: 1.25; letter-spacing: 0; }
.hq-chat-intro > p { margin: 0 0 22px; color: var(--hq-chat-muted); font-size: 13px; line-height: 1.55; }
.hq-chat label { display: block; margin-bottom: 13px; }
.hq-chat label > span { display: block; margin-bottom: 6px; color: #394650; font-size: 11px; font-weight: 700; }
.hq-chat input,
.hq-chat textarea {
    display: block;
    width: 100%;
    border: 1px solid #d9dfe3;
    border-radius: 6px;
    outline: 0;
    color: var(--hq-chat-ink);
    background: #fff;
    font: inherit;
    font-size: 13px;
    letter-spacing: 0;
    transition: border-color .15s, box-shadow .15s;
}
.hq-chat input { height: 42px; padding: 0 12px; }
.hq-chat textarea { min-height: 76px; padding: 11px 12px; resize: none; line-height: 1.45; }
.hq-chat input:focus,
.hq-chat textarea:focus { border-color: var(--hq-chat-accent); box-shadow: 0 0 0 3px rgba(249, 154, 0, .13); }
.hq-chat-error { min-height: 17px; margin: -4px 0 7px; color: #c93647; font-size: 11px; }
.hq-chat-primary {
    display: flex;
    width: 100%;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 6px;
    color: #17222c;
    background: var(--hq-chat-accent);
    font-size: 13px;
    font-weight: 750;
    cursor: pointer;
}
.hq-chat-primary:hover { background: #ffad27; }
.hq-chat-primary:disabled,
.hq-chat-composer button:disabled { opacity: .6; cursor: wait; }
.hq-chat-thread { height: 100%; }
.hq-chat-messages {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px 16px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.hq-chat-message { display: flex; margin-bottom: 13px; }
.hq-chat-message.is-visitor { justify-content: flex-end; }
.hq-chat-bubble { max-width: 82%; }
.hq-chat-bubble p { margin: 0; padding: 10px 12px; border-radius: 8px 8px 8px 2px; color: #26323b; background: #fff; box-shadow: 0 1px 3px rgba(20, 31, 40, .09); font-size: 13px; line-height: 1.48; white-space: pre-wrap; overflow-wrap: anywhere; }
.hq-chat-message.is-visitor .hq-chat-bubble p { border-radius: 8px 8px 2px 8px; color: #fff; background: var(--hq-chat-ink); }
.hq-chat-bubble time { display: block; margin-top: 4px; color: #8a949b; font-size: 9px; }
.hq-chat-message.is-visitor time { text-align: right; }
.hq-chat-composer { display: flex; flex: 0 0 auto; align-items: flex-end; gap: 9px; padding: 11px 12px; border-top: 1px solid var(--hq-chat-line); background: #fff; }
.hq-chat-composer textarea { min-height: 42px; max-height: 100px; padding: 10px 11px; }
.hq-chat-composer button {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: #17222c;
    background: var(--hq-chat-accent);
    cursor: pointer;
}
.hq-chat-powered { flex: 0 0 auto; padding: 6px 12px 8px; color: #8a949b; background: #fff; font-size: 9px; text-align: center; }
.hq-chat-launcher {
    position: relative;
    display: grid;
    width: 58px;
    height: 58px;
    margin-left: auto;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 50%;
    color: #17222c;
    background: var(--hq-chat-accent);
    box-shadow: 0 9px 24px rgba(23, 34, 44, .25);
    cursor: pointer;
    transition: transform .18s ease, background .18s ease;
}
.hq-chat-launcher:hover { background: #ffad27; transform: translateY(-2px); }
.hq-chat-launcher i { font-size: 20px; }
.hq-chat-unread { position: absolute; top: -3px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; border: 2px solid #fff; border-radius: 10px; color: #fff; background: #d92f48; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }
.hq-chat [hidden] { display: none !important; }
@media (max-width: 575.98px) {
    .hq-chat { right: 72px; bottom: 12px; }
    .hq-chat-panel { right: -64px; bottom: 68px; width: calc(100vw - 16px); height: calc(100dvh - 96px); min-height: 0; }
    .hq-chat-intro { padding: 24px 20px 18px; }
}
@media (prefers-reduced-motion: reduce) {
    .hq-chat-panel, .hq-chat-launcher, .hq-chat-messages { transition: none; scroll-behavior: auto; }
}
