/* ── Bubble ──────────────────────────────────────────────────────────────── */
#qb-bubble {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #c9a84c, #a07830);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(201,168,76,0.45);
    z-index: 9000;
    transition: transform 0.2s, box-shadow 0.2s;
}
#qb-bubble:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(201,168,76,0.6); }
#qb-bubble svg { width: 26px; height: 26px; fill: #000; }

/* ── Window ──────────────────────────────────────────────────────────────── */
#qb-window {
    position: fixed;
    bottom: 98px;
    right: 28px;
    width: 360px;
    max-height: 560px;
    background: #0d0d0d;
    border: 1px solid #c9a84c44;
    border-radius: 16px;
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    z-index: 9000;
    overflow: hidden;
}
#qb-window.open { display: flex; }

/* ── Header ──────────────────────────────────────────────────────────────── */
#qb-header {
    background: linear-gradient(135deg, #c9a84c, #a07830);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-shrink: 0;
}
#qb-header .qb-icon { font-size: 1.4rem; }
#qb-header .qb-info .qb-title { font-weight: 800; font-size: 0.95rem; color: #000; }
#qb-header .qb-info .qb-sub { font-size: 0.72rem; color: #3a2a00; }
#qb-close { background: none; border: none; color: #000; font-size: 1.3rem; cursor: pointer; padding: 0 4px; line-height: 1; opacity: 0.7; }
#qb-close:hover { opacity: 1; }

/* ── Progress ────────────────────────────────────────────────────────────── */
#qb-progress-bar { height: 3px; background: #1a1a1a; flex-shrink: 0; }
#qb-progress-fill { height: 100%; background: #c9a84c; transition: width 0.4s ease; width: 0%; }

/* ── Messages ────────────────────────────────────────────────────────────── */
#qb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 6px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}

.qb-msg {
    max-width: 88%;
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 10px 13px;
    border-radius: 12px;
    animation: qbFadeIn 0.25s ease;
}
.qb-msg.bot { background: #1c1c1c; color: #ddd; border-bottom-left-radius: 4px; align-self: flex-start; }
.qb-msg.user { background: linear-gradient(135deg, #c9a84c, #a07830); color: #000; font-weight: 600; border-bottom-right-radius: 4px; align-self: flex-end; }

@keyframes qbFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

/* ── Hint text ───────────────────────────────────────────────────────────── */
.qb-hint {
    font-size: 0.75rem;
    color: #555;
    line-height: 1.5;
    padding: 0 2px 4px;
    align-self: flex-start;
    animation: qbFadeIn 0.25s ease;
}

/* ── Single-select chips ─────────────────────────────────────────────────── */
.qb-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 2px; animation: qbFadeIn 0.3s ease; }
.qb-chip {
    background: #1c1c1c;
    border: 1px solid #c9a84c55;
    color: #c9a84c;
    font-size: 0.78rem;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.qb-chip:hover { background: #c9a84c; color: #000; border-color: #c9a84c; }

/* ── Multi-select chips ──────────────────────────────────────────────────── */
.qb-chip.selected { background: #c9a84c; color: #000; border-color: #c9a84c; font-weight: 700; }

/* ── Continue button ─────────────────────────────────────────────────────── */
.qb-continue-btn {
    align-self: flex-start;
    margin-top: 8px;
    background: linear-gradient(135deg, #c9a84c, #a07830);
    color: #000;
    font-weight: 800;
    font-size: 0.82rem;
    border: none;
    border-radius: 20px;
    padding: 8px 18px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: opacity 0.2s, transform 0.15s;
    animation: qbFadeIn 0.3s ease;
}
.qb-continue-btn:hover { opacity: 0.88; transform: translateY(-1px); }
@keyframes qbShake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}
.qb-continue-btn.shake { animation: qbShake 0.4s ease; }

/* ── Dropdown ────────────────────────────────────────────────────────────── */
.qb-dropdown-wrap { width: 100%; animation: qbFadeIn 0.3s ease; }
.qb-dropdown {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ddd;
    font-size: 0.85rem;
    padding: 9px 12px;
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23c9a84c' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.qb-dropdown:focus { border-color: #c9a84c; }
.qb-dropdown option { background: #1a1a1a; color: #ddd; }

/* ── Textarea ────────────────────────────────────────────────────────────── */
.qb-textarea-wrap { width: 100%; animation: qbFadeIn 0.3s ease; }
.qb-textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ddd;
    font-size: 0.85rem;
    padding: 9px 12px;
    outline: none;
    resize: vertical;
    min-height: 72px;
    font-family: inherit;
    line-height: 1.5;
    transition: border-color 0.2s;
}
.qb-textarea:focus { border-color: #c9a84c; }
.qb-textarea::placeholder { color: #555; }

/* ── Contact form ────────────────────────────────────────────────────────── */
.qb-contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    animation: qbFadeIn 0.3s ease;
}
.qb-contact-input {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #ddd;
    font-size: 0.84rem;
    padding: 9px 12px;
    outline: none;
    width: 100%;
    transition: border-color 0.2s;
    font-family: inherit;
}
.qb-contact-input:focus { border-color: #c9a84c; }
.qb-contact-input::placeholder { color: #555; }

/* ── Summary card ────────────────────────────────────────────────────────── */
.qb-summary {
    background: #141414;
    border: 1px solid #c9a84c33;
    border-radius: 10px;
    padding: 14px;
    font-size: 0.82rem;
    color: #bbb;
    line-height: 1.7;
    animation: qbFadeIn 0.3s ease;
}
.qb-summary-title {
    font-size: 0.88rem;
    font-weight: 800;
    color: #c9a84c;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #c9a84c22;
}
.qb-summary-row { margin-bottom: 4px; }
.qb-summary-row strong { color: #c9a84c; }
.qb-summary-opps { margin-top: 10px; padding-top: 8px; border-top: 1px solid #1e1e1e; }
.qb-summary-opps strong { color: #c9a84c; }
.qb-summary-opps ul { margin: 6px 0 0 14px; }
.qb-summary-opps li { margin-bottom: 3px; color: #ccc; }
.qb-summary-note { margin-top: 10px; font-size: 0.78rem; color: #555; font-style: italic; }

#qb-submit-btn {
    width: 100%;
    margin-top: 12px;
    padding: 11px;
    background: linear-gradient(135deg, #c9a84c, #a07830);
    color: #000;
    font-weight: 800;
    font-size: 0.9rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: opacity 0.2s;
}
#qb-submit-btn:hover { opacity: 0.88; }
#qb-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Done / thank-you ────────────────────────────────────────────────────── */
.qb-done {
    background: #0f0f0f;
    border: 1px solid #c9a84c44;
    border-radius: 10px;
    padding: 16px;
    font-size: 0.84rem;
    color: #bbb;
    line-height: 1.7;
    animation: qbFadeIn 0.3s ease;
}
.qb-done-title { font-size: 1rem; font-weight: 900; color: #c9a84c; margin-bottom: 10px; }
.qb-done p { margin-bottom: 8px; }
.qb-done strong { color: #e0d0a0; }
.qb-schedule-btn {
    display: block;
    margin-top: 14px;
    background: linear-gradient(135deg, #c9a84c, #a07830);
    color: #000;
    font-weight: 800;
    font-size: 0.88rem;
    text-align: center;
    text-decoration: none;
    padding: 11px 16px;
    border-radius: 8px;
    letter-spacing: 0.03em;
    transition: opacity 0.2s;
}
.qb-schedule-btn:hover { opacity: 0.88; }

/* ── Text input area ─────────────────────────────────────────────────────── */
#qb-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #1e1e1e;
    background: #0d0d0d;
    flex-shrink: 0;
}
#qb-input {
    flex: 1;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    color: #fff;
    font-size: 0.88rem;
    padding: 9px 12px;
    outline: none;
    transition: border-color 0.2s;
}
#qb-input:focus { border-color: #c9a84c; }
#qb-input::placeholder { color: #555; }
#qb-send {
    background: #c9a84c;
    border: none;
    border-radius: 8px;
    color: #000;
    font-size: 1.1rem;
    width: 38px;
    cursor: pointer;
    transition: background 0.2s;
}
#qb-send:hover { background: #e0be6a; }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 420px) {
    #qb-window { width: calc(100vw - 24px); right: 12px; bottom: 88px; }
    #qb-bubble { right: 16px; bottom: 20px; }
}
