/* ==========================================================================
   BOTO AI PILOT - FLOATING CHAT WIDGET STYLES (LIGHT MODE)
   ========================================================================== */

/* --- 1. ROOT & POINTER EVENT CONTROLS --- */
#boto-widget-root {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif !important;
    position: fixed !important;
    bottom: 24px !important;
    z-index: 999999 !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
    pointer-events: none !important;
}

#boto-widget-root *, 
#boto-widget-root *:before, 
#boto-widget-root *:after {
    box-sizing: border-box !important;
}

/* Re-enable clicks strictly on interactive widget elements */
#boto-widget-root .boto-trigger-container,
#boto-widget-root #boto-chat-container,
#boto-widget-root button,
#boto-widget-root input,
#boto-widget-root textarea,
#boto-widget-root a,
#boto-widget-root .boto-tab-btn {
    pointer-events: auto !important;
}

/* Hide launcher badge completely when chat modal is open */
#boto-widget-root.boto-chat-open .boto-trigger-container {
    display: none !important;
}

/* --- 2. BASE FORM & LINK RESET RULES --- */
#boto-widget-root button {
    font-family: inherit !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
}

#boto-widget-root input, 
#boto-widget-root textarea {
    font-family: inherit !important;
    margin: 0 !important;
    outline: none !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
}

#boto-widget-root a {
    text-decoration: none !important;
    box-shadow: none !important;
    background: none !important;
}

.boto-pos-right { right: 24px !important; }
.boto-pos-left { left: 24px !important; }

/* --- 3. FLOATING TRIGGER LAUNCHER --- */
.boto-trigger-container {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    position: relative !important;
    cursor: pointer !important;
}

/* Speech Bubble */
.boto-talk-bubble {
    margin-bottom: 8px !important;
    animation: botoBounce 2s infinite ease-in-out !important;
}

.boto-bubble-box {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    padding: 6px 12px !important;
    border-radius: 16px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    white-space: nowrap !important;
}

.boto-bubble-arrow {
    width: 0 !important;
    height: 0 !important;
    border-left: 6px solid transparent !important;
    border-right: 6px solid transparent !important;
    border-top: 6px solid #ffffff !important;
    margin: 0 auto !important;
}

@keyframes botoBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

/* Floating Mascot Button */
#boto-widget-trigger {
    position: relative !important;
    width: 60px !important;
    height: 60px !important;
    border-radius: 50% !important;
    border: 3px solid #28A646 !important;
    background: #ffffff !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
    transition: transform 0.2s ease !important;
    outline: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#boto-widget-trigger:hover {
    transform: scale(1.08) !important;
}

#boto-widget-trigger img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.boto-online-dot {
    position: absolute !important;
    bottom: 2px !important;
    right: 2px !important;
    width: 12px !important;
    height: 12px !important;
    background: #10b981 !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
}

.boto-online-ping {
    position: absolute !important;
    bottom: 2px !important;
    right: 2px !important;
    width: 12px !important;
    height: 12px !important;
    background: #10b981 !important;
    border-radius: 50% !important;
    animation: botoPing 1.5s cubic-bezier(0, 0, 0.2, 1) infinite !important;
    opacity: 0.75 !important;
}

@keyframes botoPing {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}

.boto-click-me-badge {
    margin-top: 6px !important;
    padding: 3px 10px !important;
    border-radius: 12px !important;
    background: #28A646 !important;
    color: #ffffff !important;
    font-size: 10px !important;
    font-weight: 800 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    text-align: center !important;
    white-space: nowrap !important;
}

/* --- 4. MAIN CHAT CONTAINER & LAYOUT --- */
#boto-chat-container {
    position: fixed !important;
    bottom: 24px !important;
    right: 24px !important;
    width: 380px !important;
    max-width: calc(100vw - 32px) !important;
    height: 600px !important;
    max-height: calc(100vh - 48px) !important;
    background: #ffffff !important;
    border-radius: 20px !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    z-index: 999999 !important;
    transition: transform 0.2s ease, opacity 0.2s ease !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.boto-pos-left #boto-chat-container {
    left: 24px !important;
    right: auto !important;
}

.boto-pos-right #boto-chat-container {
    right: 24px !important;
    left: auto !important;
}

/* STRICT VISIBILITY RULES */
.boto-hidden,
#boto-view-chat.boto-hidden,
#boto-view-contact.boto-hidden,
#boto-view-quick.boto-hidden,
#boto-typing-indicator.boto-hidden,
#boto-chat-container.boto-hidden {
    display: none !important;
}

/* --- 5. HEADER BAR --- */
.boto-header {
    padding: 12px 16px !important;
    background: #28A646 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

.boto-bot-info {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.boto-avatar-wrap {
    position: relative !important;
    width: 40px !important;
    height: 40px !important;
    flex-shrink: 0 !important;
}

.boto-avatar-wrap img {
    width: 100% !important;
    height: 100% !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    border: 2px solid rgba(255,255,255,0.8) !important;
    display: block !important;
    margin: 0 !important;
}

.boto-status-dot {
    position: absolute !important;
    bottom: 0 !important;
    right: 0 !important;
    width: 10px !important;
    height: 10px !important;
    background: #10b981 !important;
    border: 2px solid #ffffff !important;
    border-radius: 50% !important;
}

.boto-header-title-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
}

.boto-header-title-row strong {
    font-size: 14px !important;
    color: #ffffff !important;
    font-weight: 800 !important;
}

.boto-online-badge {
    background: rgba(255,255,255,0.2) !important;
    color: #ffffff !important;
    font-size: 9px !important;
    font-weight: 800 !important;
    padding: 2px 6px !important;
    border-radius: 10px !important;
    text-transform: uppercase !important;
}

.boto-bot-info span {
    font-size: 11px !important;
    color: rgba(255,255,255,0.9) !important;
}

#boto-chat-close {
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 22px !important;
    cursor: pointer !important;
    opacity: 0.9 !important;
    padding: 0 4px !important;
    line-height: 1 !important;
}

#boto-chat-close:hover { opacity: 1 !important; }

/* --- 6. NAVIGATION TABS BAR --- */
.boto-tabs-bar {
    background: #ffffff !important;
    padding: 8px 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    z-index: 10 !important;
}

.boto-tab-btn {
    flex: 1 !important;
    padding: 8px 10px !important;
    background: #f8fafc !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    text-align: center !important;
    outline: none !important;
    box-shadow: none !important;
    margin: 0 !important;
    pointer-events: auto !important;
}

.boto-tab-btn:hover { background: #f1f5f9 !important; color: #0f172a !important; }

.boto-tab-active {
    background: #28A646 !important;
    color: #ffffff !important;
    border-color: #28A646 !important;
}

/* --- 7. VIEW SECTIONS & CONTAINERS --- */
.boto-view-section {
    flex: 1 !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-y: auto !important;
    background: #ffffff !important;
    color: #0f172a !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

/* --- Sleek Modern Contact Form Styling --- */
/* --- 1. Base Container --- */
#boto-view-contact {
    padding: 16px 18px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

.boto-contact-form-header {
    margin-bottom: 14px !important;
    text-align: left !important;
}

.boto-contact-form-header h3 {
    margin: 0 0 4px 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
    line-height: 1.2 !important;
}

.boto-contact-form-header p {
    margin: 0 !important;
    font-size: 12px !important;
    color: #64748b !important;
    line-height: 1.35 !important;
}

/* --- 2. Form & Field Wrapper Alignment --- */
#boto-direct-form-wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#boto-direct-form-wrap .boto-form-group {
    width: 90% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}

/* --- 3. Sleek Inputs & Textarea --- */
#boto-direct-form-wrap input,
#boto-direct-form-wrap textarea {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding: 10px 12px !important;
    margin: 0 !important;
    font-size: 13px !important;
    font-family: inherit !important;
    line-height: 1.4 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 8px !important;
    background-color: #f8fafc !important;
    color: #0f172a !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
    outline: none !important;
    box-shadow: none !important;
}

#boto-direct-form-wrap input::placeholder,
#boto-direct-form-wrap textarea::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}

/* Active Focus Effect */
#boto-direct-form-wrap input:focus,
#boto-direct-form-wrap textarea:focus {
    background-color: #ffffff !important;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12) !important;
}

#boto-direct-form-wrap textarea {
    resize: vertical !important;
    min-height: 70px !important;
}

/* --- 4. Submit Button --- */
#boto-direct-submit-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 11px 16px !important;
    margin-top: 4px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
    transition: opacity 0.2s ease, transform 0.1s ease !important;
}

#boto-direct-submit-btn:hover {
    opacity: 0.92 !important;
}

#boto-direct-submit-btn:active {
    transform: scale(0.99) !important;
}

/* --- 5. Success Card Alignment --- */
#boto-direct-success {
    text-align: center !important;
    padding: 24px 16px !important;
}

.boto-success-card .boto-success-icon {
    font-size: 36px !important;
    display: block !important;
    margin-bottom: 8px !important;
}

.boto-success-card h4 {
    margin: 0 0 6px 0 !important;
    font-size: 16px !important;
    color: #0f172a !important;
}

.boto-success-card p {
    margin: 0 !important;
    font-size: 13px !important;
    color: #64748b !important;
    line-height: 1.4 !important;
}

/* Vertical Stack with Tight Gaps */


#boto-view-contact h3,
#boto-view-contact label { color: #0f172a !important; }
#boto-view-contact p { color: #475569 !important; }

#boto-view-contact input,
#boto-view-contact textarea {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    border-radius: 8px !important;
    padding: 10px !important;
}

.boto-token-banner {
    background: #f8fafc !important;
    padding: 6px 12px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-size: 10px !important;
    color: #64748b !important;
    flex-shrink: 0 !important;
}

.boto-token-title {
    color: #28A646 !important;
    font-weight: 800 !important;
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.boto-token-badge {
    background: rgba(40,166,70,0.1) !important;
    color: #28A646 !important;
    padding: 2px 8px !important;
    border-radius: 10px !important;
    font-weight: 800 !important;
    border: 1px solid rgba(40,166,70,0.2) !important;
}

/* --- 8. CONNECT / QUICK CONTACT SECTION --- */
#boto-view-quick {
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #f8fafc !important;
}

.boto-quick-head h3 {
    margin: 0 0 4px 0 !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    color: #0f172a !important;
}

.boto-quick-head p {
    margin: 0 0 10px 0 !important;
    font-size: 12px !important;
    color: #64748b !important;
}

.boto-contact-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

.boto-contact-card:hover {
    border-color: #28A646 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(40,166,70,0.12) !important;
}

.boto-card-left {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.boto-card-icon {
    width: 36px !important;
    height: 36px !important;
    border-radius: 10px !important;
    background: rgba(40,166,70,0.08) !important;
    color: #28A646 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
    flex-shrink: 0 !important;
}

.boto-card-details {
    display: flex !important;
    flex-direction: column !important;
}

.boto-card-label {
    font-size: 10px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    color: #94a3b8 !important;
    letter-spacing: 0.5px !important;
}

.boto-card-val {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #0f172a !important;
}

.boto-card-action {
    font-size: 11px !important;
    font-weight: 700 !important;
    color: #28A646 !important;
    background: #f0fdf4 !important;
    padding: 4px 10px !important;
    border-radius: 8px !important;
    border: 1px solid rgba(40,166,70,0.2) !important;
}

/* --- 9. CHAT MESSAGES & TYPING INDICATOR --- */
#boto-chat-messages {
    flex: 1 !important;
    min-height: 0 !important;
    padding: 12px !important;
    overflow-y: auto !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #f8fafc !important;
}

.boto-msg {
    max-width: 85% !important;
    padding: 10px 14px !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
}

.boto-msg-bot {
    background: #ffffff !important;
    color: #0f172a !important;
    border: 1px solid #e2e8f0 !important;
    align-self: flex-start !important;
    border-bottom-left-radius: 4px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

.boto-msg-user {
    background: #28A646 !important;
    color: #ffffff !important;
    align-self: flex-end !important;
    border-bottom-right-radius: 4px !important;
    font-weight: 600 !important;
}

.boto-typing-box {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #64748b !important;
    padding: 8px 14px !important;
    border-radius: 16px !important;
    border-bottom-left-radius: 4px !important;
    align-self: flex-start !important;
    font-size: 11px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin: 4px 0 !important;
    flex-shrink: 0 !important;
}

.boto-typing-dots {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.boto-dot {
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    background: #28A646 !important;
    border-radius: 50% !important;
    animation: botoDotBounce 1.4s infinite ease-in-out both !important;
}

.boto-dot-1 { animation-delay: -0.32s !important; }
.boto-dot-2 { animation-delay: -0.16s !important; }

@keyframes botoDotBounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* --- 10. LEAD FORM & INPUT BAR --- */
#boto-lead-form {
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    padding: 12px !important;
    flex-shrink: 0 !important;
}

.boto-lead-form-head {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 8px !important;
    color: #0f172a !important;
}

.boto-lead-form-head h4 { margin: 0 !important; font-size: 12px !important; font-weight: 800 !important; }
#boto-lead-close-x { background: none !important; border: none !important; color: #64748b !important; font-size: 16px !important; cursor: pointer !important; }

#boto-lead-form input {
    width: 100% !important;
    padding: 8px 10px !important;
    margin-bottom: 6px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    color: #0f172a !important;
    font-size: 11px !important;
}

.boto-lead-form-actions { display: flex !important; gap: 6px !important; }
.boto-lead-form-actions button {
    flex: 1 !important;
    padding: 8px !important;
    border: none !important;
    border-radius: 8px !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 11px !important;
    cursor: pointer !important;
}

#boto-lead-skip { background: #64748b !important; }

.boto-input-area {
    padding: 10px 12px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    display: flex !important;
    gap: 8px !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
}

#boto-chat-input {
    flex: 1 !important;
    padding: 10px 14px !important;
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 12px !important;
    color: #0f172a !important;
    font-size: 12px !important;
    outline: none !important;
    box-shadow: none !important;
    height: 40px !important;
}

#boto-chat-input::placeholder { color: #94a3b8 !important; }

#boto-chat-send {
    width: 40px !important;
    height: 40px !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 12px !important;
    background: #28A646 !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    box-shadow: 0 2px 8px rgba(40,166,70,0.3) !important;
}

/* --- 11. FOOTER LINK --- */
.boto-powered-footer {
    margin-top: auto !important;
    padding: 10px 14px !important;
    background: #ffffff !important;
    border-top: 1px solid #e2e8f0 !important;
    text-align: center !important;
    text-decoration: none !important;
    color: #64748b !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
    z-index: 20 !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.boto-powered-footer:hover { color: #0f172a !important; }
.boto-powered-footer span { color: #64748b !important; font-weight: 500 !important; }
.boto-powered-footer strong { color: #28A646 !important; font-weight: 800 !important; }

/* --- 12. RESPONSIVE MOBILE VIEW --- */
@media (max-width: 480px) {
    #boto-widget-root {
        bottom: 0 !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
    }

    #boto-chat-container {
        width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        position: fixed !important;
        border: none !important;
    }

    .boto-powered-footer {
        padding-bottom: max(10px, env(safe-area-inset-bottom)) !important;
    }
}