/* =================================================
   ROOT VARIABLES
================================================= */
:root {
    --gold: #B89239;
    --soft-gold: #C9AB83;
    --lite: #F5F0E4;
    --sand: #E9CDB4;
    --black: #111111;
    --white: #ffffff;
}

/* =================================================
   BOT WRAPPER + ENTRANCE ANIMATION
================================================= */
#setup-bot-wrapper {
    max-width: 420px;
    width: 100%;
    background: var(--white);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: Inter, system-ui, -apple-system, sans-serif;
    transform: translateY(40px);
    opacity: 0;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

#setup-bot-wrapper.bot-show {
    transform: translateY(0);
    opacity: 1;
}

#setup-bot-wrapper.bot-hidden {
    pointer-events: none;
}

/* =================================================
   BOT HEADER (FIXED OVERFLOW ISSUE)
================================================= */
.bot-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--black);
    color: var(--white);
    min-height: 72px;
    overflow: hidden;
}

.bot-header img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.bot-header div {
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: calc(100% - 60px);
    line-height: 1.2;
}

.bot-header strong {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bot-header span {
    font-size: 12px;
    opacity: 0.75;
}

/* =================================================
   CHAT BODY
================================================= */
#bot-chat {
    height: 420px;
    padding: 16px;
    background: var(--lite);
    overflow-y: auto;
    scroll-behavior: smooth;
}

/* =================================================
   MESSAGE BUBBLES
================================================= */
.bot-msg,
.user-msg {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 12px;
    max-width: 85%;
    font-size: 14px;
    line-height: 1.45;
    word-wrap: break-word;
}

/* Bot message */
.bot-msg {
    background: var(--white);
    color: var(--black);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* User message */
.user-msg {
    background: var(--gold);
    color: var(--white);
    margin-left: auto;
    box-shadow: 0 6px 16px rgba(184,146,57,0.35);
}

/* =================================================
   FADE-IN ANIMATION
================================================= */
.fade-in {
    animation: fadeIn 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================
   TYPING DOTS ANIMATION
================================================= */
.bot-typing {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.bot-typing span {
    width: 6px;
    height: 6px;
    background: #999;
    border-radius: 50%;
    animation: typingBlink 1.4s infinite both;
}

.bot-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.bot-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBlink {
    0% { opacity: 0.2; }
    20% { opacity: 1; }
    100% { opacity: 0.2; }
}

/* =================================================
   OPTIONS AREA
================================================= */
#bot-input {
    background: var(--white);
    border-top: 1px solid #eee;
}

.options {
    padding: 14px;
    display: grid;
    gap: 10px;
}

/* Option buttons */
.options button {
    padding: 12px 14px;
    border-radius: 10px;
    border: none;
    background: var(--sand);
    color: var(--black);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
}

.options button:hover {
    background: var(--gold);
    color: var(--white);
    transform: translateY(-1px);
}

/* Not sure button */
.options .not-sure {
    background: transparent;
    border: 1px dashed var(--soft-gold);
    color: var(--black);
}

.options .not-sure:hover {
    background: var(--soft-gold);
    color: var(--black);
}

/* Undo button */
.options .undo {
    background: transparent;
    border: 1px dashed #ccc;
    color: var(--black);
    font-size: 13px;
}

.options .undo:hover {
    background: #f2f2f2;
}

/* =================================================
   SCROLLBAR (SUBTLE)
================================================= */
#bot-chat::-webkit-scrollbar {
    width: 6px;
}

#bot-chat::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,0.15);
    border-radius: 10px;
}

#bot-chat::-webkit-scrollbar-track {
    background: transparent;
}

/* =================================================
   MOBILE OPTIMIZATION
================================================= */
@media (max-width: 480px) {
    #setup-bot-wrapper {
        max-width: 100%;
        border-radius: 14px;
    }

    #bot-chat {
        height: 360px;
    }
}
.options input {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    width: 100%;
}
/* =================================================
   FORM STYLES
================================================= */
.bot-form {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f9f9f9;
}

.bot-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: border 0.3s;
    font-family: inherit;
    box-sizing: border-box; /* Crucial for padding */
}

.bot-form input:focus {
    border-color: var(--gold);
}

.bot-form button#submit-lead {
    background: var(--black);
    color: var(--white);
    padding: 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
    margin-top: 5px;
    transition: background 0.3s;
}

.bot-form button#submit-lead:hover {
    background: var(--gold);
}

.bot-form button#submit-lead:disabled {
    background: #999;
    cursor: wait;
}

.privacy-note {
    font-size: 11px;
    color: #888;
    text-align: center;
    margin: 0;
}

.options .ask-ai-btn {
    background: #fff;
    border: 1px solid #724ae8;
    color: #724ae8;
}
.options .ask-ai-btn:hover {
    background: #724ae8;
    color: #fff;
}




/*ai assitant bot website css*/
/* =================================================
   1. GENERAL CHAT BOT - INPUT AREA
================================================= */
#gen-bot-input-area {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    border-radius: 0 0 16px 16px;
}

#gen-user-input {
    flex: 1;
    height: 44px;
    padding: 0 20px;
    border: 1px solid #e2e8f0;
    border-radius: 22px; /* Pill shape */
    font-size: 14px;
    outline: none;
    background: #f8fafc;
    color: #334155;
    transition: all 0.2s ease;
}

#gen-user-input:focus {
    border-color: #1e293b;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

/* FIXED SEND BUTTON */
#gen-send-btn {
    width: 44px !important;      /* Fixed width */
    height: 44px !important;     /* Fixed height */
    min-width: 44px !important;  /* Prevents squashing (Crucial) */
    min-height: 44px !important;
    border-radius: 50% !important; /* Forces perfect circle */
    background: #1e293b !important;
    color: #fff !important;
    border: none !important;
    margin: 0 0 0 10px !important; /* Margin Left only */
    padding: 0 !important;       /* Removes theme padding */
    cursor: pointer !important;
    font-size: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.2s, background 0.2s !important;
    box-shadow: none !important;
}

#gen-send-btn:hover {
    transform: scale(1.05);
    background: #0f172a;
}

/* =================================================
   2. STICKY BOT WIDGET (Bottom Right)
================================================= */

/* Main Container - Fixed to Viewport */
#zenerom-bot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    left: auto;
    z-index: 999999;
    font-family: 'Inter', system-ui, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Aligns content to right */
    width: auto;
    height: auto;
}

/* Toggle Button - Perfectly Round */
#zenerom-toggle-btn {
    width: 60px !important;
    height: 60px !important;
    min-width: 60px !important;
    min-height: 60px !important;
    border-radius: 50% !important;
    background: #1e293b;
    border: 3px solid #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    cursor: pointer;
    overflow: hidden;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-sizing: border-box;
}

#zenerom-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

/* Icon Image Fix */
#zenerom-toggle-btn img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Prevents squashing */
    display: block;
    border-radius: 50%;
    background: #fff;
}

/* Notification Dot */
.notification-dot {
    position: absolute;
    top: 0;
    right: 0;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}

/* =================================================
   3. CHAT WINDOW POPUP
================================================= */
#zenerom-gen-wrapper {
    position: absolute;
    bottom: 80px; /* Sits above button */
    right: 0;     /* Anchors to right edge of button */
    left: auto;
    width: 360px;
    height: 520px;
    max-height: 80vh;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    /* Animation State: Hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animation State: Visible */
#zenerom-gen-wrapper.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

/* Chat Header */
.bot-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    color: #fff;
    background: #1e293b;
    flex-shrink: 0;
}

.bot-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.2);
    object-fit: cover;
}

/* Chat Body area */
#gen-bot-chat {
    flex: 1;
    padding: 16px;
    background: #f8fafc;
    overflow-y: auto;
    scroll-behavior: smooth;
    overscroll-behavior: contain; /* Prevents body scroll */
}

/* Message Bubbles */
.bot-msg, .user-msg {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
    word-wrap: break-word;
    animation: fadeIn 0.3s ease;
}

.bot-msg {
    background: #fff;
    color: #1e293b;
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-msg {
    background: #1e293b;
    color: #fff;
    margin-left: auto;
    border-bottom-right-radius: 2px;
}

/* =================================================
   4. LEAD FORM STYLES (Inside Chat)
================================================= */
.gen-lead-form {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin: 15px 0;
    border: 1px solid #e2e8f0;
    animation: slideUp 0.3s ease-out;
}

.gen-lead-form p {
    margin: 0 0 12px 0;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gen-lead-form input {
    width: 100%;
    margin-bottom: 10px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border 0.2s;
    background: #f8fafc;
}

.gen-lead-form input:focus {
    border-color: #1e293b;
    background: #fff;
    outline: none;
}

.gen-lead-form button {
    width: 100%;
    background: #1e293b;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    margin-top: 5px;
    transition: background 0.2s;
}

.gen-lead-form button:hover {
    background: #0f172a;
}

/* =================================================
   5. MOBILE RESPONSIVENESS
================================================= */
@media only screen and (max-width: 480px) {
    #zenerom-bot-container {
        bottom: 20px;
        right: 20px; /* Keep anchored to right */
        left: auto;
    }

    #zenerom-gen-wrapper {
        width: 300px;
        height: 480px; /* Standard mobile height */
        bottom: 75px;
        right: 0;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}



/* =================================================
   6. GATEKEEPER & SUGGESTED TOPICS
================================================= */

/* Locked Input State */
#gen-user-input.locked {
    background-color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Suggested Topic Chips Container */
.gen-topics-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
    animation: fadeIn 0.5s ease;
}

/* The Chip Buttons */
.topic-chip {
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

.topic-chip:hover {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b;
    transform: translateY(-2px);
}

/* Success Message styling */
.unlock-msg {
    color: #15803d; /* Green */
    background: #dcfce7;
    padding: 10px;
    border-radius: 8px;
    font-size: 13px;
    text-align: center;
    margin-bottom: 15px;
    border: 1px solid #bbf7d0;
}