/**
 * Poquoson Tree & Crane Service — Extraordinary AI Chatbot Stylesheet
 * Representative Identity: Jim Wornom's AI Assistant
 * Brand Palette:
 *   - Deep Navy: #0f172a / #1e293b
 *   - Company Red: #d10014 / #b80012
 *   - Forest Green: #1b5e20 / #15803d
 *   - Crisp White: #ffffff / #f8fafc
 */

/* ==========================================================================
   1. SUPPRESS LEGACY / DUPLICATE THIRD-PARTY CHATBOT WIDGETS
   ========================================================================== */
.embedded-agent-container,
div[id^="jf-agent"],
div[class*="jotform-agent"],
iframe[src*="jotfor.ms"],
.fb-customerchat,
#fb-root .fb_dialog,
#fb-root .fb_customer_chat_bounce_in_v2,
#fb-root .fb_customer_chat_bounce_out_v2 {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================================
   2. COORDINATE FACEBOOK MESSENGER FLOATING BUTTON WITH AI CHATBOT
   ========================================================================== */
a.poquoson-messenger-float {
    right: 26px !important;
    bottom: 94px !important;
    z-index: 9994 !important;
    transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                bottom 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.24s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.24s ease,
                box-shadow 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

/* Shift Messenger button cleanly beside the open chatbot window on desktop/tablet so zero overlap occurs */
body.poquoson-chatbot-open a.poquoson-messenger-float {
    right: 450px !important;
    bottom: 24px !important;
}

@media screen and (max-width: 1024px) {
    a.poquoson-messenger-float {
        right: 22px !important;
        bottom: 90px !important;
    }
    body.poquoson-chatbot-open a.poquoson-messenger-float {
        right: 422px !important;
        bottom: 20px !important;
    }
}

@media screen and (max-width: 767px) {
    a.poquoson-messenger-float {
        right: 16px !important;
        bottom: 86px !important;
    }
    /* When mobile chat window is open, hide floating Messenger bubble (accessible in chat header) */
    body.poquoson-chatbot-open a.poquoson-messenger-float {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        transform: scale(0.8) !important;
    }
}

/* ==========================================================================
   3. ROOT CONTAINER & FLOATING LAUNCHER BUTTON
   ========================================================================== */
#poquoson-ai-chatbot-root {
    position: fixed;
    right: 24px;
    bottom: 20px;
    z-index: 9995;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.45;
    color: #0f172a;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

#poquoson-ai-chatbot-root *,
#poquoson-ai-chatbot-root *::before,
#poquoson-ai-chatbot-root *::after {
    box-sizing: border-box;
}

/* Floating Launcher Button */
.poquoson-cb-launcher {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    height: 60px;
    padding: 6px 18px 6px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #d10014;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.38),
                0 4px 12px rgba(209, 0, 20, 0.28);
    color: #ffffff;
    cursor: pointer;
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.26s cubic-bezier(0.16, 1, 0.3, 1),
                background 0.26s ease;
    outline: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.poquoson-cb-launcher:hover,
.poquoson-cb-launcher:focus-visible {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.45),
                0 6px 16px rgba(209, 0, 20, 0.38);
}

.poquoson-cb-launcher:focus-visible {
    outline: 3px solid rgba(209, 0, 20, 0.45);
    outline-offset: 2px;
}

/* Launcher Logo Avatar (Clean White Frame Preserving Exact Proportions) */
.poquoson-cb-launcher-avatar {
    position: relative;
    width: 56px;
    height: 44px;
    border-radius: 22px;
    background: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.poquoson-cb-launcher-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
}

.poquoson-cb-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0f172a;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
}

.poquoson-cb-launcher-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-right: 2px;
}

.poquoson-cb-launcher-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.2px;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 5px;
}

.poquoson-cb-launcher-badge {
    display: inline-block;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #d10014;
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 4px;
    line-height: 1.3;
}

.poquoson-cb-launcher-sub {
    font-size: 11px;
    font-weight: 500;
    color: #cbd5e1;
    line-height: 1.2;
    margin-top: 1px;
}

.poquoson-cb-launcher-close-icon {
    display: none;
    width: 24px;
    height: 24px;
    color: #ffffff;
}

/* When Chatbot is Open, Launcher transforms into a sleek minimize button */
body.poquoson-chatbot-open .poquoson-cb-launcher {
    padding: 0;
    width: 54px;
    height: 54px;
    justify-content: center;
    border-radius: 50%;
    background: #d10014;
    border-color: #ffffff;
}

body.poquoson-chatbot-open .poquoson-cb-launcher-avatar,
body.poquoson-chatbot-open .poquoson-cb-launcher-text {
    display: none;
}

body.poquoson-chatbot-open .poquoson-cb-launcher-close-icon {
    display: block;
}

/* ==========================================================================
   4. CHATBOT WINDOW CONTAINER & OPENING ANIMATION
   ========================================================================== */
.poquoson-cb-window {
    position: fixed;
    right: 24px;
    bottom: 86px;
    width: 412px;
    max-width: calc(100vw - 32px);
    height: 650px;
    max-height: calc(100vh - 108px);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.34),
                0 8px 20px rgba(15, 23, 42, 0.18),
                0 0 0 1px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(22px) scale(0.96);
    transform-origin: bottom right;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
                visibility 0.28s ease;
    z-index: 9996;
}

body.poquoson-chatbot-open .poquoson-cb-window {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

/* ==========================================================================
   5. CHATBOT HEADER (DARK NAVY + RED ACCENT + ORIGINAL LOGO)
   ========================================================================== */
.poquoson-cb-header {
    position: relative;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 10px 12px;
    border-top: 3px solid #d10014;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-shrink: 0;
}

.poquoson-cb-header-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

/* Clean White Logo Container inside Header (Never crops or distorts bull & tree) */
.poquoson-cb-header-logo {
    position: relative;
    width: 54px;
    height: 38px;
    border-radius: 9px;
    background: #ffffff;
    padding: 2px 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
    border: 1.5px solid rgba(255, 255, 255, 0.95);
    flex-shrink: 0;
}

.poquoson-cb-header-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
}

.poquoson-cb-header-online {
    position: absolute;
    bottom: -3px;
    right: -3px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid #0f172a;
}

.poquoson-cb-header-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.poquoson-cb-header-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: 0.1px;
    margin: 0;
}

.poquoson-cb-header-rep {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: #cbd5e1;
    line-height: 1.2;
}

.poquoson-cb-ai-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    background: rgba(209, 0, 20, 0.92);
    color: #ffffff;
    padding: 1px 5px;
    border-radius: 99px;
}

.poquoson-cb-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.poquoson-cb-hdr-btn {
    width: 29px;
    height: 29px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.18s ease, transform 0.18s ease, color 0.18s ease;
    padding: 0;
}

.poquoson-cb-hdr-btn:hover,
.poquoson-cb-hdr-btn:focus-visible {
    background: #d10014;
    border-color: #d10014;
    color: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.poquoson-cb-hdr-btn.poquoson-cb-hdr-fb:hover {
    background: #0084FF;
    border-color: #0084FF;
}

/* ==========================================================================
   6. SCROLLABLE MESSAGE STREAM & WELCOME SCREEN CARD
   ========================================================================== */
.poquoson-cb-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 12px 12px 12px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 9px;
    scroll-behavior: smooth;
}

.poquoson-cb-body::-webkit-scrollbar {
    width: 6px;
}

.poquoson-cb-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.poquoson-cb-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

/* Welcome Screen Card */
.poquoson-cb-welcome-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-top: 3px solid #0f172a;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
    text-align: center;
}

.poquoson-cb-welcome-logo-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 3px 10px;
    margin-bottom: 5px;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.04);
}

.poquoson-cb-welcome-logo-wrap img {
    height: 30px;
    width: auto;
    max-width: 100px;
    object-fit: contain !important;
    display: block;
}

.poquoson-cb-welcome-heading {
    font-size: 14.2px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 3px 0;
    line-height: 1.22;
}

.poquoson-cb-welcome-subtext {
    font-size: 11.8px;
    color: #475569;
    margin: 0 0 7px 0;
    line-height: 1.35;
}

.poquoson-cb-trust-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

.poquoson-cb-trust-tag {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 700;
    color: #1e293b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 2px 7px;
    border-radius: 99px;
}

.poquoson-cb-trust-tag svg {
    color: #1b5e20;
    flex-shrink: 0;
}

/* ==========================================================================
   7. CHAT MESSAGE BUBBLES (AI ASSISTANT & VISITOR)
   ========================================================================== */
.poquoson-cb-msg {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    max-width: 100%;
    animation: poquosonCbFadeIn 0.22s ease-out;
}

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

.poquoson-cb-msg-bot {
    align-self: flex-start;
}

.poquoson-cb-msg-user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.poquoson-cb-msg-avatar {
    width: 40px;
    height: 30px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    padding: 2px 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 5px rgba(15, 23, 42, 0.06);
    margin-top: 2px;
}

.poquoson-cb-msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
}

.poquoson-cb-msg-content-wrap {
    display: flex;
    flex-direction: column;
    max-width: calc(100% - 48px);
}

.poquoson-cb-msg-user .poquoson-cb-msg-content-wrap {
    align-items: flex-end;
    max-width: 85%;
}

.poquoson-cb-msg-sender {
    font-size: 10.5px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.poquoson-cb-msg-bubble {
    padding: 11px 13px;
    border-radius: 14px;
    font-size: 13.2px;
    line-height: 1.5;
    word-wrap: break-word;
}

.poquoson-cb-msg-bot .poquoson-cb-msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.poquoson-cb-msg-user .poquoson-cb-msg-bubble {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.14);
}

.poquoson-cb-msg-bubble p {
    margin: 0 0 8px 0;
}

.poquoson-cb-msg-bubble p:last-child {
    margin-bottom: 0;
}

.poquoson-cb-msg-bubble ul {
    margin: 6px 0 8px 0;
    padding-left: 18px;
}

.poquoson-cb-msg-bubble li {
    margin-bottom: 4px;
}

.poquoson-cb-msg-bubble strong {
    color: #0f172a;
    font-weight: 700;
}

.poquoson-cb-msg-user .poquoson-cb-msg-bubble strong {
    color: #ffffff;
}

/* Inline Action Buttons inside Bot Responses */
.poquoson-cb-inline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.poquoson-cb-action-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    line-height: 1.2;
}

.poquoson-cb-action-link:hover {
    transform: translateY(-1px);
}

.poquoson-cb-action-estimate {
    background: #1b5e20;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(27, 94, 32, 0.25);
}

.poquoson-cb-action-estimate:hover {
    background: #144718;
}

.poquoson-cb-action-call {
    background: #d10014;
    color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(209, 0, 20, 0.25);
}

.poquoson-cb-action-call:hover {
    background: #b00011;
}

.poquoson-cb-action-email {
    background: #ffffff;
    color: #1b5e20 !important;
    border-color: #1b5e20;
}

.poquoson-cb-action-email:hover {
    background: #f0fdf4;
}

.poquoson-cb-action-fb {
    background: #0084FF;
    color: #ffffff !important;
}

/* ==========================================================================
   8. QUICK-ACTION BUTTONS GRID (ALL 7 REQUIRED BUTTONS)
   ========================================================================== */
.poquoson-cb-quick-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 9px 10px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.poquoson-cb-quick-label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.poquoson-cb-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
}

.poquoson-cb-quick-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    padding: 6.5px 8px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #0f172a;
    font-size: 11.5px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1.2;
}

.poquoson-cb-quick-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    color: #d10014;
}

.poquoson-cb-quick-btn:hover,
.poquoson-cb-quick-btn:focus-visible {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.14);
    outline: none;
}

.poquoson-cb-quick-btn:hover svg,
.poquoson-cb-quick-btn:focus-visible svg {
    color: #ffffff;
}

/* Highlight Request a Free Estimate & Emergency Tree Service */
.poquoson-cb-quick-btn.is-estimate-highlight {
    grid-column: span 2;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    border-color: #1b5e20;
    color: #ffffff;
    justify-content: center;
    padding: 9px 12px;
    font-size: 12.5px;
    box-shadow: 0 3px 10px rgba(27, 94, 32, 0.25);
}

.poquoson-cb-quick-btn.is-estimate-highlight svg {
    color: #ffffff;
}

.poquoson-cb-quick-btn.is-estimate-highlight:hover {
    background: linear-gradient(135deg, #144718 0%, #1b5e20 100%);
}

.poquoson-cb-quick-btn.is-emergency-highlight {
    border-color: rgba(209, 0, 20, 0.45);
    background: #fff5f5;
    color: #991b1b;
}

.poquoson-cb-quick-btn.is-emergency-highlight:hover {
    background: #d10014;
    border-color: #d10014;
    color: #ffffff;
}

/* Contextual Follow-Up Chips */
.poquoson-cb-chips-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.poquoson-cb-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    border-radius: 99px;
    padding: 4px 10px;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.16s ease;
}

.poquoson-cb-chip:hover {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* ==========================================================================
   9. IN-CHAT FREE ESTIMATE REQUEST FORM CARD
   ========================================================================== */
.poquoson-cb-estimate-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-top: 4px solid #1b5e20;
    border-radius: 12px;
    padding: 11px 12px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    animation: poquosonCbFadeIn 0.25s ease-out;
}

.poquoson-cb-est-header {
    margin-bottom: 7px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
}

.poquoson-cb-est-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 2px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.poquoson-cb-est-title svg {
    color: #1b5e20;
}

.poquoson-cb-est-sub {
    font-size: 11px;
    color: #475569;
    margin: 0;
}

.poquoson-cb-est-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.poquoson-cb-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.poquoson-cb-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.poquoson-cb-field label {
    font-size: 11px;
    font-weight: 700;
    color: #1e293b;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.poquoson-cb-req {
    color: #d10014;
    margin-left: 2px;
}

.poquoson-cb-input,
.poquoson-cb-select,
.poquoson-cb-textarea {
    width: 100%;
    padding: 5px 8px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 12px;
    font-family: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.poquoson-cb-input:focus,
.poquoson-cb-select:focus,
.poquoson-cb-textarea:focus {
    outline: none;
    border-color: #0f172a;
    background: #ffffff;
    box-shadow: 0 0 0 2.5px rgba(15, 23, 42, 0.12);
}

.poquoson-cb-input.has-error,
.poquoson-cb-select.has-error,
.poquoson-cb-textarea.has-error {
    border-color: #d10014;
    background: #fff5f5;
}

.poquoson-cb-field-error {
    font-size: 11px;
    font-weight: 600;
    color: #d10014;
    display: none;
}

.poquoson-cb-field-error.is-visible {
    display: block;
}

/* Radio Pills for Preferred Contact Method */
.poquoson-cb-contact-methods {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.poquoson-cb-method-option {
    position: relative;
}

.poquoson-cb-method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.poquoson-cb-method-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 6px;
    border-radius: 7px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    font-size: 11.5px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    text-align: center;
    transition: all 0.16s ease;
}

.poquoson-cb-method-option input:checked + .poquoson-cb-method-pill {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
}

/* Optional Photo Upload */
.poquoson-cb-file-wrap {
    position: relative;
    border: 1.5px dashed #94a3b8;
    border-radius: 8px;
    padding: 7px 10px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    cursor: pointer;
    transition: border-color 0.16s ease, background 0.16s ease;
}

.poquoson-cb-file-wrap:hover {
    border-color: #0f172a;
    background: #f1f5f9;
}

.poquoson-cb-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.poquoson-cb-file-label {
    font-size: 11.5px;
    font-weight: 600;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.poquoson-cb-est-submit {
    width: 100%;
    padding: 10px 14px;
    border-radius: 9px;
    border: none;
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 4px 12px rgba(27, 94, 32, 0.28);
    transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
    margin-top: 2px;
}

.poquoson-cb-est-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(27, 94, 32, 0.36);
}

.poquoson-cb-est-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.poquoson-cb-est-disclaimer {
    font-size: 10.5px;
    color: #64748b;
    text-align: center;
    margin: 2px 0 0 0;
    line-height: 1.35;
}

/* Estimate Submission Confirmation Card */
.poquoson-cb-est-success {
    background: #f0fdf4;
    border: 1.5px solid #22c55e;
    border-radius: 12px;
    padding: 13px;
    color: #14532d;
}

.poquoson-cb-est-success-title {
    font-size: 14px;
    font-weight: 800;
    color: #15803d;
    margin: 0 0 5px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.poquoson-cb-ref-badge {
    display: inline-block;
    background: #0f172a;
    color: #ffffff;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    margin: 4px 0 6px 0;
}

/* ==========================================================================
   10. TYPING INDICATOR
   ========================================================================== */
.poquoson-cb-typing {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    border-top-left-radius: 4px;
}

.poquoson-cb-typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #94a3b8;
    animation: poquosonCbBounce 1.3s infinite ease-in-out;
}

.poquoson-cb-typing-dot:nth-child(2) {
    animation-delay: 0.16s;
}

.poquoson-cb-typing-dot:nth-child(3) {
    animation-delay: 0.32s;
}

@keyframes poquosonCbBounce {
    0%, 80%, 100% {
        transform: scale(0.75);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ==========================================================================
   11. PERSISTENT FOOTER BAR & TEXT INPUT
   ========================================================================== */
.poquoson-cb-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding: 8px 12px 10px 12px;
    flex-shrink: 0;
}

.poquoson-cb-footer-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    margin-bottom: 7px;
    overflow-x: auto;
    scrollbar-width: none;
}

.poquoson-cb-footer-bar::-webkit-scrollbar {
    display: none;
}

.poquoson-cb-bar-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #1e293b;
    transition: all 0.15s ease;
}

.poquoson-cb-bar-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.poquoson-cb-bar-btn.is-bar-estimate {
    background: #f0fdf4;
    border-color: #86efac;
    color: #15803d;
}

.poquoson-cb-bar-btn.is-bar-estimate:hover {
    background: #1b5e20;
    border-color: #1b5e20;
    color: #ffffff;
}

.poquoson-cb-bar-btn.is-bar-call {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.poquoson-cb-bar-btn.is-bar-call:hover {
    background: #d10014;
    border-color: #d10014;
    color: #ffffff;
}

.poquoson-cb-input-form {
    display: flex;
    align-items: center;
    gap: 7px;
}

.poquoson-cb-text-input {
    flex: 1;
    height: 40px;
    padding: 0 13px;
    border-radius: 99px;
    border: 1.5px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.poquoson-cb-text-input:focus {
    outline: none;
    border-color: #0f172a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
}

.poquoson-cb-send-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #d10014;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(209, 0, 20, 0.3);
    transition: transform 0.16s ease, background 0.16s ease;
}

.poquoson-cb-send-btn:hover,
.poquoson-cb-send-btn:focus-visible {
    background: #b00011;
    transform: scale(1.05);
    outline: none;
}

/* ==========================================================================
   12. RESPONSIVE BREAKPOINTS (TABLET, IPHONE, ANDROID)
   ========================================================================== */
@media screen and (max-width: 1024px) {
    .poquoson-cb-window {
        right: 20px;
        bottom: 84px;
        width: 394px;
        height: 635px;
    }
}

@media screen and (max-width: 767px) {
    #poquoson-ai-chatbot-root {
        right: 14px;
        bottom: 16px;
    }

    .poquoson-cb-launcher {
        height: 56px;
        padding: 5px 14px 5px 6px;
        gap: 8px;
    }

    .poquoson-cb-launcher-avatar {
        width: 50px;
        height: 40px;
    }

    .poquoson-cb-launcher-title {
        font-size: 12.5px;
    }

    .poquoson-cb-launcher-sub {
        font-size: 10.5px;
    }

    .poquoson-cb-window {
        right: 10px;
        left: 10px;
        bottom: 74px;
        width: auto;
        max-width: none;
        height: calc(100vh - 86px);
        height: calc(100dvh - 86px);
        max-height: 675px;
        border-radius: 18px;
    }
}

@media screen and (max-width: 380px) {
    .poquoson-cb-header-title {
        font-size: 12.5px;
    }
    .poquoson-cb-quick-btn {
        font-size: 11px;
        padding: 6px 7px;
    }
}

