/* ========== CORE CONTAINER ELEMENTS ========== */

/* Floating Button (launcher) */
.chatbot-button {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: #f75842; /* brand red */
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.25);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .25s ease;
    z-index: 1000;
    font-size: 14px;
    line-height: 1.4;
    font-family: var(--font-family-2, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}
.chatbot-button img {
    width: 32px;
    height: 32px;
}
.chatbot-button:hover {
    transform: scale(1.08);
}

/* Chat Window Shell */
.chatbot-window {
    position: fixed;
    bottom: 10px;
    right: 20px;
    width: 360px;
    max-height: 520px;

    display: none;            /* JS toggles this to flex */
    flex-direction: column;
    overflow: hidden;

    background: #ffffff;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    box-shadow: 0 16px 40px rgba(0,0,0,0.3);

    z-index: 1100;
    font-size: 14px;
    line-height: 1.4;
    font-family: var(--font-family-2, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif);
}

/* ========== HEADER ========== */

.chat-header {
    background: #1a1f2d;            /* dark/navy brand bar */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    column-gap: 12px;
    padding: 10px 12px;
}

.chat-header .chat-logo {
    max-height: 28px;
    max-width: 160px;
    object-fit: contain;
}

.chat-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

#chatRetry {
    background: none;
    border: none;
    padding: 0;
    line-height: 0;
    cursor: pointer;
}
#chatRetry img {
    width: 20px;
    height: 20px;
    display: block;
    filter: invert(1) brightness(1.5); /* make icon appear white on dark bg */
}

.chat-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    font-weight: 600;
    padding: 0 4px;
}

/* ========== BODY (messages area) ========== */

.chat-body {
    background: #fff;
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    row-gap: 10px;

    scrollbar-width: thin;
    scrollbar-color: #bbb #f9f9f9;
}
.chat-body::-webkit-scrollbar {
    width: 6px;
}
.chat-body::-webkit-scrollbar-thumb {
    background-color: #bbb;
    border-radius: 10px;
}

/* Message bubbles */
.chat-message {
    max-width: 85%;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    padding: 10px 12px;
    word-wrap: break-word;
    box-shadow: 0 4px 10px rgba(0,0,0,0.06);
    animation: fadeUp .25s ease;
    background: #e9ecef;
    color: #000;
    align-self: flex-end; /* default style looks like 'user' */
}

/* Bot bubble */
.chat-message.bot {
    background: #1a1f2d; /* dark/navy */
    color: #fff;
    align-self: flex-start;
}

/* Force paragraphs inside bot messages to stay white */
.chat-message.bot p,
.bot p {
    color: #fff;
    margin: 0;
}

/* User bubble (explicit, if you're adding class "user") */
.chat-message.user {
    background: #e9ecef;
    color: #000;
    align-self: flex-end;
}

/* ========== SUGGESTION CHIPS / OPTIONS ========== */

/* Wrapper list for chips */
.suggestions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    row-gap: 8px;
    width: 100%;
}

/* Individual chips (main menu, services menu, etc.) */
.suggestion-chip {
    display: inline-block;
    background: #f75842;       /* brand red */
    color: #fff;
    font-size: 13px;
    line-height: 1.4;
    font-weight: 500;

    padding: 10px 14px;
    border-radius: 20px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: all .2s ease;
    border: 1px solid transparent;
    max-width: 100%;
    text-align: left;
    word-break: break-word;
}

.suggestion-chip:hover {
    background: #fff;
    color: #1a1f2d;
    border-color: #f75842;
    transform: scale(1.05);
}

/* serviceSuggestions group specifically */
#serviceSuggestions {
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    width: 100%;
}

/* YES / NO group */
#yesNoOptions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-top: 8px;
    justify-content: flex-start;
}
#yesNoOptions .suggestion-chip {
    min-width: 72px;
    text-align: center;
    padding: 10px 14px;    /* same as base chip */
    border-radius: 20px;   /* same radius so they look consistent */
    background: #f75842;
    color: #fff;
    border: 1px solid transparent;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
    transition: all .2s ease;
}
#yesNoOptions .suggestion-chip:hover {
    background: #f75842;  /* keep solid for Yes/No */
    color: #fff;
    border-color: #f75842;
    transform: translateY(-2px);
}

/* Close Chat button (appears at end of flow) */
#finalCloseBtn {
    display: block;
    background: #f75842;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;

    padding: 10px 12px;
    margin: 16px auto 8px auto;
    width: calc(100% - 32px);  /* aligns to chat-body padding on both sides */
    max-width: 200px;

    box-shadow: 0 4px 12px rgba(247,88,66,0.4);
    transition: background .2s ease, box-shadow .2s ease;
}
#finalCloseBtn:hover {
    background: #d94e33;
    box-shadow: 0 6px 16px rgba(217,78,51,0.5);
}

/* ========== CONTACT FORM BLOCK ========== */
/*
   Your JS injects:

   <div class="chat-message bot"><p>...</p></div>
   <form id="contactForm" class="chat-form"> ... </form>
*/

.chat-form {
    background: #ffffff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 16px;
    width: 100%;

    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
}

/* Inputs */
.chat-form input {
    width: 100%;
    background: #fff;
    border: 1px solid #cfd3d9;
    border-radius: 6px;

    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #1a1f2d;
    outline: none;
    font-family: inherit;
}

/* Placeholder color */
.chat-form input::placeholder {
    color: #888;
    opacity: 1;
}

/* Focus styles */
.chat-form input:focus {
    border-color: #f75842;
    box-shadow: 0 0 0 2px rgba(247,88,66,0.15);
}

/* Submit button in the form */
.chat-form button#submitBtn {
    width: 100%;
    background: #f75842;
    color: #fff;
    border: none;
    border-radius: 6px;

    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
    font-family: inherit;
}

.chat-form button#submitBtn:hover {
    background: #d94e33;
    box-shadow: 0 4px 10px rgba(217,78,51,0.3);
}

/* ========== FOOTER INPUT BAR (user typing area) ========== */

.chat-footer {
    background: #f8f9fa;
    border-top: 1px solid #ddd;
    padding: 10px;
    display: flex;
    align-items: center;
    column-gap: 8px;
    font-size: 14px;
    line-height: 1.4;
}

/* User typing field */
#chatInput {
    flex: 1;
    background: #fff;
    border: 1px solid #cfd3d9;
    border-radius: 20px;
    padding: 8px 12px;
    font-size: 14px;
    line-height: 1.4;
    color: #1a1f2d;
    outline: none;
    font-family: inherit;
}
#chatInput::placeholder {
    color: #888;
    opacity: 1;
}
#chatInput:focus {
    border-color: #f75842;
    box-shadow: 0 0 0 2px rgba(247,88,66,0.15);
}
#chatInput:disabled {
    background: #eceeef;
    color: #999;
    cursor: not-allowed;
}

/* Send button (circle with send icon) */
#sendBtn {
    background: #f75842;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #fff;
    font-size: 16px;
    line-height: 1.4;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
}
#sendBtn img {
    width: 20px;
    height: 20px;
    filter: invert(1) brightness(1.5); /* ensure white icon */
}
#sendBtn:disabled {
    background: #999;
    cursor: not-allowed;
    box-shadow: none;
}
#sendBtn:not(:disabled):hover {
    background: #d94e33;
    box-shadow: 0 4px 10px rgba(217,78,51,0.3);
}

/* ========== ANIMATIONS ========== */

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== RESPONSIVE (mobile narrow screens) ========== */

@media screen and (max-width: 480px) {
    .chatbot-window {
        width: 90%;
        right: 5%;
        bottom: 80px;
        max-height: 70vh;
    }
    .chat-header .chat-logo {
        max-width: 140px;
        max-height: 24px;
    }
}

.open-chat-popup{position:fixed;bottom:0px;right:2px;background:var(--color-danger);;font-size:19px;font-weight:normal;text-align:center;width:50px;height:48px;line-height:50px;color:#ffffff;cursor:pointer;display:inline-block;z-index:99999;border-radius:50%;-webkit-transition:all 500ms ease;transition:all 500ms ease;}

