/* ChatzyBot Widget — Aria-inspired minimal design */

*, *::before, *::after { box-sizing: border-box; }

/* ── THEME ISOLATION ── */
#chatzy-window input,
#chatzy-window textarea,
#chatzy-window button,
#chatzy-window select {
    all: unset;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
#chatzy-window button { cursor: pointer; }
#chatzy-launcher {
    all: unset;
    box-sizing: border-box;
    cursor: pointer;
}

/* ── VARIABLES ── */
#chatzy-window {
    --bg:      #ffffff;
    --surface: #f7f7f5;
    --border:  #e8e8e4;
    --border2: #d4d4ce;
    --black:   #111111;
    --dark:    #333333;
    --muted:   #999999;
    --light:   #cccccc;
    --green:   #22c55e;
    --shadow:  rgba(0,0,0,0.06);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── LAUNCHER ── */
#chatzy-launcher {
    position: fixed !important;
    bottom: 28px !important; right: 28px !important;
    width: 58px !important; height: 58px !important;
    border-radius: 50% !important;
    border: 1.5px solid #111111 !important;
    cursor: pointer !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #111111 !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.18) !important;
    transition: transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s !important;
    padding: 0 !important;
}
#chatzy-launcher:hover {
    transform: scale(1.07) !important;
    box-shadow: 0 6px 28px rgba(0,0,0,.26) !important;
}
#chatzy-launcher svg {
    width: 22px; height: 22px;
    fill: #fff;
    transition: transform .35s cubic-bezier(.34,1.56,.64,1);
}
#chatzy-launcher.cb-open svg { transform: rotate(45deg); }
#chatzy-launcher img,
#chatzy-launcher video {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    z-index: 1 !important;
}

.cb-notif {
    position: absolute;
    top: -1px; right: -1px;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: #555;
    border: 2px solid #fff;
    font-size: 8px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── WINDOW ── */
#chatzy-window {
    position: fixed;
    bottom: 100px; right: 28px;
    width: 355px; height: 565px;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,.10), 0 2px 8px rgba(0,0,0,.06);
    transform-origin: bottom right;
    transform: scale(0.85) translateY(14px);
    opacity: 0;
    pointer-events: none;
    transition: transform .38s cubic-bezier(.34,1.25,.64,1), opacity .25s ease;
    z-index: 999998;
}
#chatzy-window.cb-open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}
@media (max-width: 420px) {
    #chatzy-window   { width: calc(100vw - 20px); right: 10px; bottom: 84px; }
    #chatzy-launcher { bottom: 14px; right: 14px; width: 52px; height: 52px; }
}

/* ── HEADER ── */
.cb-header {
    padding: 13px 15px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.cb-hav {
    width: 38px; height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--black);
    overflow: visible;
    position: relative;
}
.cb-hav img,
.cb-hav video { width: 38px; height: 38px; object-fit: cover; border-radius: 50%; display: block; }
.cb-hav svg { width: 16px; height: 16px; fill: #fff; }
.cb-hav::after {
    content: '';
    position: absolute;
    bottom: 0; right: 0;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--green);
    border: 2px solid var(--surface);
}
.cb-hinfo { flex: 1; min-width: 0; }
.cb-hname {
    font-family: Georgia, 'Noto Serif', 'Times New Roman', serif;
    font-weight: 300;
    font-size: 17px;
    color: var(--black);
    letter-spacing: -0.3px;
    line-height: 1;
    margin-bottom: 3px;
}
.cb-hstatus {
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 5px;
}
.cb-hstatus span {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--green);
    display: inline-block;
    flex-shrink: 0;
}
.cb-hclose {
    width: 28px !important; height: 28px !important;
    border-radius: 50% !important;
    background: transparent !important;
    border: 1px solid var(--border) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all .2s !important;
    flex-shrink: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}
.cb-hclose:hover { background: var(--border) !important; }
.cb-hclose svg { width: 11px; height: 11px; fill: none; stroke: var(--muted); stroke-width: 1.5; }

/* ── STEP DOTS ── */
.cb-dots {
    display: flex;
    justify-content: center;
    gap: 5px;
    padding: 7px 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.cb-dot {
    width: 5px; height: 5px;
    border-radius: 99px;
    background: var(--light);
    transition: all .3s;
}
.cb-dot.cb-active {
    width: 20px;
    background: var(--black);
}

/* ── SCREENS ── */
.cb-screens { flex: 1; overflow: hidden; position: relative; }
.cb-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    transition: transform .4s cubic-bezier(.77,0,.18,1), opacity .28s ease;
    background: var(--bg);
}
.cb-screen.cb-left  { transform: translateX(-100%); opacity: 0; pointer-events: none; }
.cb-screen.cb-right { transform: translateX(100%);  opacity: 0; pointer-events: none; }
.cb-screen.cb-active{ transform: translateX(0);     opacity: 1; pointer-events: all; }

/* ── SCREEN 1: LEAD FORM ── */
#cb-s-lead {
    padding: 22px 20px 16px;
    overflow-y: auto;
    background: var(--bg);
}
#cb-s-lead::-webkit-scrollbar { width: 2px; }
#cb-s-lead::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

.cb-lead-hero { text-align: center; margin-bottom: 20px; }
.cb-lead-av {
    width: 52px; height: 52px;
    border-radius: 14px;
    margin: 0 auto 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
}
.cb-lead-av img,
.cb-lead-av video { width: 52px; height: 52px; object-fit: cover; border-radius: 50%; display: block; }
.cb-lead-av svg { width: 22px; height: 22px; fill: var(--muted); }
.cb-lead-title {
    font-family: Georgia, 'Noto Serif', 'Times New Roman', serif;
    font-weight: 300;
    font-size: 26px;
    color: var(--black);
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}
.cb-lead-sub {
    font-size: 14px;
    color: var(--dark);
    line-height: 1.7;
    letter-spacing: 0.02em;
}

.cb-fields { display: flex; flex-direction: column; gap: 10px; }
.cb-field-group {}
.cb-flabel {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.cb-field {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    transition: border-color .2s;
}
.cb-field:focus-within { border-color: var(--border2); }
.cb-field.cb-field-err { border-color: #ef4444; }
.cb-field svg { width: 13px; height: 13px; fill: var(--light); flex-shrink: 0; }
.cb-field input {
    flex: 1 !important;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: normal !important;
    color: var(--black) !important;
    padding: 12px 0 !important;
    margin: 0 !important;
    caret-color: var(--black) !important;
    width: 100% !important;
    display: block !important;
    line-height: normal !important;
}
.cb-field input::placeholder { color: var(--muted); }
.cb-err {
    font-size: 13px;
    color: #ef4444;
    margin-top: 3px;
    padding-left: 2px;
    display: none;
    letter-spacing: 0.04em;
}
.cb-cta {
    margin-top: 16px !important;
    width: 100% !important;
    padding: 12px !important;
    border: 1.5px solid var(--black) !important;
    border-radius: 48px !important;
    cursor: pointer !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 13px !important;
    letter-spacing: 0.2em !important;
    text-transform: uppercase !important;
    font-weight: 400 !important;
    color: #fff !important;
    background: var(--black) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    transition: background .2s, transform .15s !important;
    line-height: normal !important;
    text-decoration: none !important;
}
.cb-cta:hover { background: var(--dark) !important; }
.cb-cta svg { width: 13px; height: 13px; fill: #fff; }
.cb-privacy {
    text-align: center;
    font-size: 12px;
    color: var(--muted);
    margin-top: 8px;
    line-height: 1.6;
    letter-spacing: 0.03em;
}

/* ── SCREEN 2: CHOICE ── */
#cb-s-choice {
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--bg);
}
.cb-choice-top { text-align: center; margin-bottom: 24px; }
.cb-choice-name {
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--dark);
    margin-bottom: 8px;
}
.cb-choice-title {
    font-family: Georgia, 'Noto Serif', 'Times New Roman', serif;
    font-weight: 300;
    font-size: 24px;
    color: var(--black);
    letter-spacing: -0.3px;
}
.cb-choice-list { display: flex; flex-direction: column; gap: 10px; }
.cb-choice-btn {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 14px 15px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 13px !important;
    text-align: left !important;
    transition: background .2s, border-color .2s, transform .15s !important;
    width: 100% !important;
    margin: 0 !important;
    line-height: normal !important;
}
.cb-choice-btn:hover { background: var(--bg) !important; border-color: var(--border2) !important; transform: translateX(2px) !important; }
.cb-choice-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cb-choice-icon svg { width: 17px; height: 17px; fill: var(--dark); }
.cb-choice-body { flex: 1; }
.cb-choice-body strong {
    display: block;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    color: var(--black);
    font-weight: 400;
    margin-bottom: 2px;
}
.cb-choice-body span { font-size: 12px; color: var(--dark); letter-spacing: 0.04em; }
.cb-choice-arrow { width: 13px; height: 13px; fill: none; stroke: var(--light); stroke-width: 1.5; flex-shrink: 0; }
.cb-back-btn {
    background: none !important;
    border: none !important;
    color: var(--muted) !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    margin-top: 16px !important;
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    transition: color .2s !important;
    line-height: normal !important;
}
.cb-back-btn:hover { color: var(--black) !important; }

/* ── SCREEN 3: VOICE ── */
#cb-s-voice {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    position: relative;
    overflow: hidden; /* rings clip here — wrap scrolls internally */
}

#cb-s-voice::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 28px 28px;
    opacity: 0.35;
    pointer-events: none;
}

.cb-voice-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* top-align so nothing gets cut off */
    padding: 14px 16px 12px;
    position: relative;
    z-index: 1;
    gap: 0;
    overflow-y: auto;
    overflow-x: hidden;
}
.cb-voice-wrap::-webkit-scrollbar { width: 2px; }
.cb-voice-wrap::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* ── ORB ── */
.cb-orb-wrap {
    position: relative;
    width: 120px;
    height: 120px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.cb-o-ring {
    position: absolute;
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border);
    pointer-events: none;
}
.cb-o-ring-1 { width: 160px; height: 160px; animation: cb-spin 25s linear infinite; }
.cb-o-ring-2 { width: 192px; height: 192px; border-style: dashed; animation: cb-spin 38s linear infinite reverse; opacity: 0.5; }
.cb-o-ring-3 { width: 224px; height: 224px; border-color: transparent; border-top-color: var(--border); animation: cb-spin 50s linear infinite; opacity: 0.3; }
@keyframes cb-spin { to { transform: translate(-50%,-50%) rotate(360deg); } }

.cb-orb {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--bg);
    border: 1.5px solid var(--border2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color .4s ease, box-shadow .4s ease, transform .2s ease;
    box-shadow: 0 2px 8px var(--shadow), 0 8px 32px var(--shadow), inset 0 1px 0 rgba(255,255,255,.9);
}
.cb-orb:hover { transform: scale(1.025); }

.cb-orb.listening {
    border-color: var(--black);
    box-shadow: 0 0 0 8px rgba(17,17,17,.05), 0 8px 40px rgba(0,0,0,.12);
}
.cb-orb.speaking {
    border-color: var(--green);
    box-shadow: 0 0 0 8px rgba(34,197,94,.08), 0 8px 40px rgba(34,197,94,.10);
}
.cb-orb.thinking {
    border-color: var(--border2);
    animation: cb-orb-think-pulse 1.8s ease-in-out infinite;
}
@keyframes cb-orb-think-pulse {
    0%,100% { box-shadow: 0 2px 8px var(--shadow), 0 8px 32px var(--shadow); }
    50%      { box-shadow: 0 4px 20px rgba(0,0,0,.1), 0 16px 48px rgba(0,0,0,.08); }
}

.cb-orb-wave {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 44px;
}
.cb-orb-bar {
    width: 3px;
    border-radius: 3px;
    background: var(--black);
    height: 6px;
    transition: height .08s ease, opacity .2s;
    opacity: 0.15;
}
.cb-orb.listening .cb-orb-bar,
.cb-orb.speaking  .cb-orb-bar { opacity: 0.7; }

.cb-orb-think {
    display: none;
    align-items: center;
    gap: 7px;
}
.cb-orb-think span {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--black);
    opacity: 0.15;
    animation: cb-think-pop 1.2s ease-in-out infinite;
}
.cb-orb-think span:nth-child(2) { animation-delay: .2s; }
.cb-orb-think span:nth-child(3) { animation-delay: .4s; }
@keyframes cb-think-pop {
    0%,100% { opacity: .12; transform: scale(.8); }
    50%      { opacity: .7;  transform: scale(1.2); }
}

.cb-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 40px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 11px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    transition: all .3s;
}
    border-color: rgba(34,197,94,.3);
    background: rgba(34,197,94,.05);
    color: var(--green);
}
.cb-pill-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--light);
    flex-shrink: 0;
    transition: all .3s;
}
.cb-status-pill.live .cb-pill-dot {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(34,197,94,.2);
    animation: cb-dot-pulse 2s infinite;
}
@keyframes cb-dot-pulse {
    0%,100% { box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
    50%      { box-shadow: 0 0 0 7px rgba(34,197,94,.04); }
}

.cb-voice-state {
    font-size: 12px;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
    min-height: 12px;
    text-align: center;
    transition: color .3s;
}
.cb-voice-state.on    { color: var(--black); }
.cb-voice-state.green { color: var(--green); }

.cb-voice-name {
    font-family: Georgia, 'Noto Serif', 'Times New Roman', serif;
    font-weight: 300;
    font-size: 28px;
    color: var(--black);
    letter-spacing: -0.5px;
    text-align: center;
    margin-bottom: 2px;
    line-height: 1;
}
.cb-voice-role {
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: center;
    margin-bottom: 10px;
}

.cb-mic-btn {
    width: 58px !important; height: 58px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--black) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: var(--black) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,.15) !important;
    transition: background .2s, border-color .2s, transform .2s !important;
    margin-bottom: 6px !important;
    padding: 0 !important;
}
.cb-mic-btn:hover { background: var(--dark) !important; }
.cb-mic-btn.recording {
    background: var(--bg);
    border-color: var(--black);
    animation: cb-mic-ring 1.8s ease-in-out infinite;
}
.cb-mic-btn.recording svg { fill: var(--black) !important; }
@keyframes cb-mic-ring {
    0%,100% { box-shadow: 0 0 0 4px rgba(17,17,17,.07), 0 4px 20px rgba(0,0,0,.10); }
    50%      { box-shadow: 0 0 0 12px rgba(17,17,17,.03), 0 4px 20px rgba(0,0,0,.10); }
}
.cb-mic-btn svg { width: 22px; height: 22px; fill: #fff; transition: fill .2s; }

.cb-mic-hint {
    font-size: 12px;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 10px;
    transition: color .3s;
    text-align: center;
}
.cb-mic-hint.active { color: var(--muted); }

.cb-voice-actions {
    display: flex;
    gap: 8px;
    width: 100%;
}
.cb-vbtn {
    flex: 1 !important;
    padding: 9px 10px !important;
    border-radius: 48px !important;
    background: transparent !important;
    border: 1px solid var(--border) !important;
    cursor: pointer !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.15em !important;
    text-transform: uppercase !important;
    color: var(--muted) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    transition: all .2s !important;
    line-height: normal !important;
    margin: 0 !important;
}
.cb-vbtn:hover { border-color: var(--black) !important; color: var(--black) !important; }
.cb-vbtn svg { width: 12px; height: 12px; fill: currentColor; }

/* Primary variant — Back to Chat gets a filled black style */
.cb-vbtn.cb-vbtn-primary {
    background: var(--black) !important;
    border-color: var(--black) !important;
    color: #fff !important;
}
.cb-vbtn.cb-vbtn-primary:hover {
    background: var(--dark) !important;
    border-color: var(--dark) !important;
    color: #fff !important;
}

/* ══════════════════════════════════════════════════════════
   VOICE INFO POPUP
   Appears at bottom of voice screen when bot mentions
   a phone number, email, or link. Auto-hides after 12s.
══════════════════════════════════════════════════════════ */
#cb-voice-popup {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    padding: 10px 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: linear-gradient(to top, var(--bg) 70%, transparent);
    transform: translateY(100%);
    opacity: 0;
    transition: transform .35s cubic-bezier(.34,1.25,.64,1), opacity .25s ease;
    pointer-events: none;
}
#cb-voice-popup.cb-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* ── FALLBACK UI ── */
#cb-voice-fallback {
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
}
.cb-fallback-icon {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cb-fallback-icon svg { width: 26px; height: 26px; fill: var(--muted); }
.cb-fallback-bar {
    display: flex;
    gap: 7px;
    width: 100%;
    align-items: center;
}
.cb-fallback-bar input {
    flex: 1 !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 48px !important;
    padding: 10px 16px !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: normal !important;
    color: var(--black) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .2s !important;
    caret-color: var(--black) !important;
    margin: 0 !important;
    line-height: normal !important;
    display: block !important;
    width: 100% !important;
}
.cb-fallback-bar input:focus { border-color: var(--border2) !important; }
.cb-fallback-bar input::placeholder { color: var(--muted) !important; }
.cb-fallback-note {
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    line-height: 1.6;
    margin: 0;
    letter-spacing: 0.03em;
}
#cb-voice-fallback .cb-send {
    width: 38px; height: 38px;
    border-radius: 50%;
    border: 1.5px solid var(--black);
    background: var(--black);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s;
}
#cb-voice-fallback .cb-send:hover { background: var(--dark); }
#cb-voice-fallback .cb-send svg { width: 13px; height: 13px; fill: #fff; }

/* ── SCREEN 4: CHAT ── */
#cb-s-chat { overflow: hidden; background: var(--bg); display: flex; flex-direction: column; }
.cb-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
    background: var(--bg);
}
.cb-messages::-webkit-scrollbar { width: 2px; }
.cb-messages::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

.cb-msg { display: flex; gap: 8px; align-items: flex-end; animation: cb-fadeUp .28s ease; }
.cb-msg.cb-user { flex-direction: row-reverse; }
@keyframes cb-fadeUp { from{opacity:0;transform:translateY(6px)} to{opacity:1;transform:translateY(0)} }

.cb-mav {
    width: 24px; height: 24px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--black);
    border: 1px solid var(--border);
    font-family: Georgia, 'Noto Serif', 'Times New Roman', serif;
    font-size: 10px;
    color: #fff;
}
.cb-mav img,
.cb-mav video { width: 24px; height: 24px; object-fit: cover; border-radius: 50%; display: block; }
.cb-mav svg { width: 11px; height: 11px; fill: #fff; }

.cb-mwrap { display: flex; flex-direction: column; max-width: 80%; }
.cb-msg.cb-user .cb-mwrap { align-items: flex-end; }

.cb-msender {
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 4px;
    padding: 0 3px;
}
.cb-msg.cb-user .cb-msender { text-align: right; }

.cb-bubble {
    padding: 9px 13px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.65;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.cb-msg.cb-bot .cb-bubble {
    background: var(--surface);
    border: 1px solid var(--border);
    border-top-left-radius: 3px;
    color: var(--dark);
}
.cb-msg.cb-user .cb-bubble {
    background: var(--black);
    border-top-right-radius: 3px;
    color: #fff;
}
.cb-mtime { font-size: 11px; color: var(--muted); margin-top: 3px; padding: 0 3px; letter-spacing: 0.05em; }
.cb-msg.cb-user .cb-mtime { text-align: right; }

/* TYPING */
.cb-typing { display: flex; gap: 5px; align-items: center; padding: 4px 0; }
.cb-dot-t {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--muted);
    animation: cb-bounce 1.2s infinite;
    opacity: 0.4;
}
.cb-dot-t:nth-child(2){animation-delay:.18s}
.cb-dot-t:nth-child(3){animation-delay:.36s}
@keyframes cb-bounce { 0%,60%,100%{transform:translateY(0)} 30%{transform:translateY(-4px)} }

/* ── QUICK REPLIES ── */
.cb-quick-replies {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 6px 12px 8px;
    background: var(--bg);
    border-top: 1px solid var(--border);
}
.cb-qr {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 12px !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    padding: 5px 13px !important;
    border-radius: 99px !important;
    background: transparent !important;
    border: 1px solid var(--border) !important;
    color: var(--muted) !important;
    cursor: pointer !important;
    transition: all .18s !important;
    white-space: nowrap !important;
    display: inline-block !important;
    line-height: normal !important;
    margin: 0 !important;
}
.cb-qr:hover {
    background: var(--black) !important;
    border-color: var(--black) !important;
    color: #fff !important;
}

/* ── INPUT BAR ── */
.cb-input-bar {
    padding: 10px 11px;
    background: var(--surface);
    border-top: 1px solid var(--border);
    display: flex;
    gap: 7px;
    align-items: center;
    flex-shrink: 0;
}
.cb-input-bar input {
    flex: 1 !important;
    background: var(--bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: 48px !important;
    padding: 9px 15px !important;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif !important;
    font-size: 14px !important;
    font-weight: normal !important;
    color: var(--black) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color .2s !important;
    caret-color: var(--black) !important;
    margin: 0 !important;
    line-height: normal !important;
    display: block !important;
    width: 100% !important;
}
.cb-input-bar input:focus { border-color: var(--border2) !important; }
.cb-input-bar input::placeholder { color: var(--muted) !important; }

.cb-voice-toggle {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    border: 1px solid #000000 !important;
    background: #000000 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: all .2s !important;
    padding: 0 !important;
    margin: 0 !important;
}
.cb-voice-toggle:hover { border-color: var(--border2) !important; background: var(--bg) !important; }
.cb-voice-toggle svg {
    width: 25px;
    height: 25px;
    fill: #ffffff;
}

.cb-send {
    width: 34px !important; height: 34px !important;
    border-radius: 50% !important;
    border: 1.5px solid var(--black) !important;
    background: var(--black) !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    transition: background .2s, transform .15s !important;
    padding: 0 !important;
    margin: 0 !important;
}
.cb-send:hover  { background: var(--dark) !important; transform: scale(1.05) !important; }
.cb-send:active { transform: scale(.93) !important; }
.cb-send svg { width: 13px; height: 13px; fill: #fff; }

/* ── SESSION CLOSED MESSAGE ── */
.cb-session-closed {
    text-align: center;
    padding: 10px 14px;
    margin: 8px 0;
}
.cb-session-closed span {
    display: inline-block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 99px;
    padding: 6px 14px;
    font-size: 12px;
    color: var(--muted);
    letter-spacing: 0.04em;
}

/* ── FOOTER ── */
.cb-footer-bar {
    padding: 7px;
    text-align: center;
    background: var(--surface);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: var(--muted);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
.cb-footer-bar strong { font-weight: 600; color: var(--dark); letter-spacing: 0.05em; }
.cb-footer-bar a { font-weight: 400; color: var(--muted); text-decoration: none; }
.cb-footer-bar a:hover { color: var(--black); }

/* ══════════════════════════════════════════════════════════
   INFO CARD — inline in chat bubbles
   Phone / email / URL rendered as tappable cards with copy btn
══════════════════════════════════════════════════════════ */
.cb-info-card {
    display: inline-flex;
    align-items: center;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: 8px;
    overflow: hidden;
    vertical-align: middle;
    margin: 2px 1px;
    max-width: 100%;
    transition: border-color .18s;
}
.cb-info-card:hover {
    border-color: var(--black);
}

/* The main tappable link area */
.cb-info-card-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px 6px 8px;
    text-decoration: none;
    color: var(--black);
    min-width: 0;
    flex: 1;
    transition: background .15s;
}
.cb-info-card-link:hover {
    background: var(--surface);
}

/* Icon inside card */
.cb-info-card-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.55;
}
.cb-info-card-icon svg {
    width: 14px;
    height: 14px;
    fill: var(--black);
}

/* Label text */
.cb-info-card-text {
    font-size: 13px;
    font-weight: 500;
    color: var(--black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    letter-spacing: 0.01em;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Divider between link area and copy btn */
.cb-info-card::before {
    /* handled by border-left on .cb-copy-btn instead */
    display: none;
}

/* ── COPY BUTTON ── */
.cb-copy-btn {
    width: 32px !important;
    height: 32px !important;
    flex-shrink: 0 !important;
    border: none !important;
    border-left: 1px solid var(--border) !important;
    background: transparent !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    transition: background .15s !important;
    border-radius: 0 !important;
}
.cb-copy-btn:hover {
    background: var(--surface) !important;
}
.cb-copy-btn svg {
    width: 13px;
    height: 13px;
    fill: var(--muted);
    transition: fill .15s;
    pointer-events: none;
}
.cb-copy-btn:hover svg {
    fill: var(--black);
}
/* Copied state — green flash */
.cb-copy-btn.copied {
    background: rgba(34, 197, 94, 0.07) !important;
}
.cb-copy-btn.copied svg {
    fill: var(--green) !important;
}

/* Info card inside user bubble — invert colors */
.cb-msg.cb-user .cb-bubble .cb-info-card {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.2);
}
.cb-msg.cb-user .cb-bubble .cb-info-card:hover {
    border-color: rgba(255,255,255,0.5);
}
.cb-msg.cb-user .cb-bubble .cb-info-card-link {
    color: #fff;
}
.cb-msg.cb-user .cb-bubble .cb-info-card-text {
    color: #fff;
}
.cb-msg.cb-user .cb-bubble .cb-info-card-icon svg {
    fill: #fff;
}
.cb-msg.cb-user .cb-bubble .cb-copy-btn {
    border-left-color: rgba(255,255,255,0.15) !important;
}
.cb-msg.cb-user .cb-bubble .cb-copy-btn svg {
    fill: rgba(255,255,255,0.5);
}

/* ══════════════════════════════════════════════════════════
   VOICE POPUP INFO CARDS
   Same card style, but inside the floating popup overlay
   at the bottom of the voice screen
══════════════════════════════════════════════════════════ */
#cb-voice-popup .cb-info-card {
    display: flex;
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border2);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
#cb-voice-popup .cb-info-card-link {
    flex: 1;
    padding: 9px 12px 9px 10px;
}
#cb-voice-popup .cb-info-card-text {
    font-size: 14px;
    max-width: none;
}
#cb-voice-popup .cb-copy-btn {
    width: 40px !important;
    height: auto !important;
    border-left: 1px solid var(--border) !important;
}
#cb-voice-popup .cb-copy-btn svg {
    width: 15px;
    height: 15px;
}

/* ── PRICE BADGE — inline highlight for $ amounts ── */
.cb-price-badge {
    display: inline-block;
    background: var(--black);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 99px;
    vertical-align: middle;
    margin: 0 2px;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    white-space: nowrap;
}
/* Inside user bubble — invert */
.cb-msg.cb-user .cb-bubble .cb-price-badge {
    background: rgba(255,255,255,0.2);
    color: #fff;
}


.cb-bubble a.cb-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    word-break: break-all;
}
.cb-bubble a.cb-link:hover {
    opacity: 0.8;
}
.cb-bubble strong {
    font-weight: 600;
}
.cb-bubble ul.cb-list {
    margin: 6px 0 6px 4px;
    padding-left: 16px;
    list-style: disc;
}
.cb-bubble ul.cb-list li {
    margin-bottom: 3px;
    line-height: 1.45;
}
.cb-msg.cb-user .cb-bubble a.cb-link {
    color: #fff;
}

/* ── ITALIC in bubbles ── */
.cb-bubble em { font-style: italic; font-weight: inherit; }

/* ── SOCIAL / FAX / MAP card icon colors ── */
.cb-card-social-fb .cb-info-card-icon svg { fill: #1877f2; }
.cb-card-social-ig .cb-info-card-icon svg { stroke: #e1306c; fill: none; stroke-width: 2; }
.cb-card-social-tw .cb-info-card-icon svg { fill: #1da1f2; }
.cb-card-social-li .cb-info-card-icon svg { fill: #0a66c2; }
.cb-card-social-yt .cb-info-card-icon svg { fill: #ff0000; }
.cb-card-social-tt .cb-info-card-icon svg { fill: #010101; }
.cb-card-map       .cb-info-card-icon svg { fill: #4285f4; }
.cb-card-fax       .cb-info-card-icon svg { fill: var(--dark); }