/* visitor-chat.css: the chat bubble on the public pages (visitor-chat.js). */
.vchat { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; font-family: inherit; }
.vchat-bubble {
    position: relative; display: inline-flex; align-items: center; gap: 10px;
    padding: 12px 18px 12px 14px; border: 1px solid rgba(var(--gold-rgb), .55); border-radius: 999px;
    background: var(--gold); color: var(--black); font: 600 15px/1 inherit; font-family: inherit; cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.vchat-bubble:hover { background: var(--gold-light); }
.vchat-bubble:focus-visible, .vchat-close:focus-visible, .vchat-send:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
.vchat-icon { width: 20px; height: 18px; border-radius: 9px 9px 9px 3px; background: var(--black); position: relative; flex: none; }
.vchat-icon::after { content: ""; position: absolute; left: 5px; right: 5px; top: 8px; height: 2px; border-radius: 1px; background: var(--gold); box-shadow: 0 -4px 0 var(--gold); }
.vchat-dot { position: absolute; top: -3px; right: -3px; width: 13px; height: 13px; border-radius: 50%; background: var(--green-light); border: 2px solid var(--black); }
.vchat.open .vchat-bubble-text { display: none; }
.vchat.open .vchat-bubble { padding: 12px; }

.vchat-panel {
    width: min(370px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 110px));
    display: flex; flex-direction: column;
    background: var(--panel); color: var(--text);
    border: 1px solid rgba(var(--gold-rgb), .35); border-radius: 16px; overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
}
.vchat-panel[hidden] { display: none; }
.vchat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 16px 12px; border-bottom: 1px solid var(--white-line); }
.vchat-title { margin: 0; font-size: 17px; font-weight: 700; color: var(--text); }
.vchat-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); line-height: 1.4; }
.vchat-close { background: none; border: 0; color: var(--muted); font-size: 24px; line-height: 1; padding: 0 4px; cursor: pointer; border-radius: 6px; }
.vchat-close:hover { color: var(--text); }

.vchat-list { list-style: none; margin: 0; padding: 14px 16px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; flex: 1; min-height: 120px; }
.vchat-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; font-size: 14.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.vchat-msg.support { align-self: flex-start; background: rgba(255, 255, 255, .06); border-bottom-left-radius: 4px; }
.vchat-msg.visitor { align-self: flex-end; background: rgba(var(--gold-rgb), .18); border-bottom-right-radius: 4px; }
.vchat-note { align-self: flex-end; font-size: 12.5px; color: var(--muted); max-width: 85%; text-align: right; }

.vchat-form { display: flex; flex-direction: column; gap: 8px; padding: 12px 16px 14px; border-top: 1px solid var(--white-line); }
.vchat-text, .vchat-email {
    width: 100%; box-sizing: border-box; font: inherit; font-size: 15px; color: var(--text);
    background: rgba(255, 255, 255, .04); border: 1px solid var(--white-line); border-radius: 10px; padding: 9px 11px;
}
.vchat-text { resize: none; min-height: 44px; }
.vchat-email { font-size: 14px; }
.vchat-email[hidden] { display: none; }
.vchat-text:focus, .vchat-email:focus { outline: none; border-color: rgba(var(--gold-rgb), .6); }
.vchat-text::placeholder, .vchat-email::placeholder { color: var(--muted); }
.vchat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.vchat-status { margin: 0; font-size: 12.5px; color: var(--muted); }
.vchat-send { border: 0; border-radius: 10px; padding: 9px 18px; background: var(--gold); color: var(--black); font: inherit; font-weight: 700; cursor: pointer; }
.vchat-send:hover { background: var(--gold-light); }
.vchat-send:disabled { opacity: .6; cursor: default; }

@media (max-width: 520px) {
    .vchat { right: 12px; bottom: 12px; }
    .vchat-bubble-text { display: none; }
    .vchat-bubble { padding: 14px; }
    .vchat-panel { max-height: calc(100vh - 100px); }
}
@media print { .vchat { display: none; } }
