/* ==========================================================================
   DPF Assistant - Chat Widget UI (professional messaging style)
   Brand colours unchanged: navy #003366 | orange #F5A623 | grey #F1F1F1
   ========================================================================== */

.lwh-open-cbot, .lwh-open-cbot :root {
    --chatbot-width: 372px;
    --chatbot-font-family: 'Segoe UI', system-ui, -apple-system, 'Roboto', Arial, sans-serif;
    --chatbot-image-position-bottom: 10%;
    --chatbot-position-bottom: 5%;
    --chatbot-height: 50vh;

    --chatbot-border-color: #003366;
    --chatbot-primary-color: #F5A623;
    --chatbot-primary-dark: #DE9014;
    --chatbot-secondary-color: #003366;
    --chatbot-secondary-dark: #00224A;
    --chatbot-hover-color: #003366;

    --chatbot-bg-color: #F1F1F1;
    --chatbot-surface: #F7F8FB;
    --chatbot-line: #E7EAF0;
    --chatbot-text: #1F2937;
    --chatbot-muted: #8A93A2;

    --chatbot-scrollbar-track-color: transparent;
    --chatbot-scrollbar-thumb-color: #D3D8E0;
    --chatbot-scrollbar-thumb-hover-color: #A9B1BD;
    --chatbot-button-disabled-color: #B9BFC9;
    --chatbot-popup-bg-color: #fff;
    --chatbot-dot-color: #8A93A2;

    --chatbot-radius: 18px;
    --chatbot-shadow: 0 18px 50px rgba(0, 34, 74, .22);
}

.lwh-open-cbot *,
.lwh-open-cbot *::after,
.lwh-open-cbot *::before,
.lwh-open-cbot *:focus {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.lwh-open-cbot *:focus { box-shadow: none; }

/* ---------- Panel shell ---------- */
.lwh-open-cbot .custom-chatbot {
    width: var(--chatbot-width);
    font-family: var(--chatbot-font-family);
    position: fixed;
    bottom: var(--chatbot-position-bottom);
    right: var(--chatbot-position-right);
    overflow: visible;
    z-index: 9998;
    display: none;
}

.lwh-open-cbot .chat {
    background-color: #fff;
    position: relative;
    z-index: 9999;
    border: 1px solid rgba(0, 51, 102, .10);
    border-radius: var(--chatbot-radius);
    box-shadow: var(--chatbot-shadow);
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transform-origin: bottom right;
    transition: opacity .28s cubic-bezier(.16, 1, .3, 1), transform .28s cubic-bezier(.16, 1, .3, 1);
}

.lwh-open-cbot .chat.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ---------- Launcher ---------- */
.lwh-open-cbot .custom-chatbot__image {
    position: fixed;
    right: var(--chatbot-image-position-right);
    bottom: var(--chatbot-image-position-bottom);
    z-index: 9999;
    cursor: pointer;
    filter: hue-rotate(-120deg) saturate(1.5) brightness(2.1);
    transition: transform .25s ease;
}

.lwh-open-cbot .custom-chatbot__image:hover { transform: translateY(-3px) scale(1.05); }

/* ---------- Header ---------- */
.lwh-open-cbot .chat__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    position: relative;
    z-index: 1;
    border-bottom: none;
    background: linear-gradient(135deg, #003366 0%, #00224A 100%);
    color: #fff;
}

.lwh-open-cbot #chat_header_name {
    display: grid;
    grid-template-columns: 40px 1fr;
    column-gap: 10px;
    align-items: center;
    min-width: 0;
}

.lwh-open-cbot #chat_header_name::before {
    content: "";
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff url('../images/bot-logo.png') center center / 72% auto no-repeat;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35), 0 2px 6px rgba(0, 0, 0, .18);
}

.lwh-open-cbot #chat_header_name > .chat__title {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
}

.lwh-open-cbot #chat_header_name > div:nth-child(2) {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    display: block;
    gap: 0;
    margin-top: 1px;
}

.lwh-open-cbot .chat__title {
    font-weight: 600;
    font-size: 15.5px;
    line-height: 1.25;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lwh-open-cbot .chat__title span { font-size: 12px; }

.lwh-open-cbot .chat__status {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, .82);
    display: flex;
    gap: 6px;
    align-items: center;
    margin-top: 2px;
}

.lwh-open-cbot .chat__status span {
    background-color: #68D391;
    width: 8px;
    height: 8px;
    display: block;
    border-radius: 100px;
    box-shadow: 0 0 0 3px rgba(104, 211, 145, .25);
    animation: cbotPulse 2s ease-out infinite;
}

@keyframes cbotPulse {
    0%   { box-shadow: 0 0 0 0 rgba(104, 211, 145, .55); }
    70%  { box-shadow: 0 0 0 6px rgba(104, 211, 145, 0); }
    100% { box-shadow: 0 0 0 0 rgba(104, 211, 145, 0); }
}

.lwh-open-cbot .chat__close-icon {
    cursor: pointer;
    position: relative;
    z-index: 1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    transition: background-color .2s ease;
}

.lwh-open-cbot .chat__close-icon:hover { background-color: rgba(255, 255, 255, .15); }
.lwh-open-cbot .chat__close-icon i,
.lwh-open-cbot .chat__close-icon i:hover { color: #fff; font-size: 15px; display: block; }

.lwh-open-cbot #chat_header_back button {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
}

button#start-btn span, div#chat_header_back button { color: #fff !important; }

i.fa-solid.fa-chevron-left {
    color: #fff !important;
    font-size: 14px !important;
    padding-right: 6px;
}

.lwh-open-cbot .chat__export {
    font-size: 12px;
    cursor: pointer;
    width: fit-content;
}

.lwh-open-cbot .chat__header .chat__new {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 8px 4px;
    background-color: var(--chatbot-primary-color);
    color: #fff;
    cursor: pointer;
    border-radius: 999px;
}

/* ---------- Message list ---------- */
.lwh-open-cbot .chat__messages {
    padding: 16px 14px 8px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: var(--chatbot-height);
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background-color: var(--chatbot-surface);
    scroll-behavior: smooth;
}

.lwh-open-cbot .chat__messages::-webkit-scrollbar,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar { width: 6px; height: 6px; }

.lwh-open-cbot .chat__messages::-webkit-scrollbar-track,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar-track { background: var(--chatbot-scrollbar-track-color); }

.lwh-open-cbot .chat__messages::-webkit-scrollbar-thumb,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar-thumb {
    background: var(--chatbot-scrollbar-thumb-color);
    border-radius: 100px;
}

.lwh-open-cbot .chat__messages::-webkit-scrollbar-thumb:hover,
.lwh-open-cbot .chat__messages__ai code::-webkit-scrollbar-thumb:hover { background: var(--chatbot-scrollbar-thumb-hover-color); }

.lwh-open-cbot .chat__messages__user,
.lwh-open-cbot .chat__messages__ai {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    animation: cbotBubbleIn .3s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes cbotBubbleIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* sender label - makes it feel like DPF is chatting with you */
.lwh-open-cbot .chat__messages__ai::before {
    content: "DPF Assistant";
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .2px;
    color: var(--chatbot-muted);
    margin: 0 0 4px 40px;
}

.lwh-open-cbot .chat__messages__ai:has(.typing-animation)::before { display: none; }

.lwh-open-cbot .chat__messages__ai > div,
.lwh-open-cbot .chat__messages__user > div {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.lwh-open-cbot .chat__messages__user > div {
    justify-content: flex-end;
    align-self: stretch;
}

/* avatars */
.lwh-open-cbot .chat__messages img.bot-image,
.lwh-open-cbot .chat__messages img.avatar-image {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--chatbot-line);
    border-radius: 50% !important;
    box-shadow: 0 1px 3px rgba(16, 24, 40, .08);
    display: block;
    padding: 2px;
}

img.bot-image { border-radius: 50% !important; }

/* bot bubble */
.lwh-open-cbot .chat__messages__ai p {
    background-color: #fff;
    border: 1px solid var(--chatbot-line);
    color: var(--chatbot-text);
    padding: 10px 14px;
    border-radius: 14px 14px 14px 4px;
    width: fit-content;
    max-width: 80%;
    align-self: flex-start;
    justify-content: space-between;
    gap: .5rem;
    position: relative;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
    word-break: break-word;
}

/* user bubble */
.lwh-open-cbot .chat__messages__user p {
    background: linear-gradient(135deg, #F5A623 0%, #E5940F 100%);
    padding: 10px 14px;
    border-radius: 14px 14px 4px 14px;
    color: #fff;
    width: fit-content;
    max-width: 80%;
    align-self: flex-end;
    font-size: 14px;
    line-height: 1.55;
    box-shadow: 0 2px 6px rgba(245, 166, 35, .28);
    word-break: break-word;
}

/* time stamp inside bubbles */
.lwh-open-cbot .chat-time {
    display: block;
    margin-top: 5px;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .3px;
    text-align: right;
    line-height: 1;
}

.lwh-open-cbot .chat__messages__ai .chat-time { color: #A2AAB6; }
.lwh-open-cbot .chat__messages__user .chat-time { color: rgba(255, 255, 255, .88); }

/* links inside bot answers */
.lwh-open-cbot .custom-chatbot .chat__messages__ai a,
.chat__messages__ai a {
    color: var(--chatbot-secondary-color);
    font-weight: 600;
    text-decoration: underline !important;
}

.lwh-open-cbot .chat__messages__ai img:not(.bot-image) {
    padding: 4px;
    border-radius: 12px;
    align-self: flex-start;
    border: 1px solid var(--chatbot-line);
    max-width: 170px;
}

.lwh-open-cbot .chat__messages__user img:not(.avatar-image) {
    padding: 4px;
    border-radius: 12px;
    align-self: flex-end;
    border: 1px solid var(--chatbot-primary-color);
    max-width: 170px;
}

/* typing indicator */
.lwh-open-cbot .typing-animation p {
    padding: 12px 14px !important;
    border-radius: 14px 14px 14px 4px;
    background: #fff;
    border: 1px solid var(--chatbot-line);
}

.lwh-open-cbot .dot {
    animation: 1s blink infinite;
    fill: var(--chatbot-dot-color);
}

.lwh-open-cbot .dot:nth-child(2) { animation-delay: 250ms; }
.lwh-open-cbot .dot:nth-child(3) { animation-delay: 500ms; }

@keyframes blink { 50% { fill: transparent; } }

/* copy button on bot answers */
.lwh-open-cbot .copy-text {
    cursor: pointer;
    font-size: 11px;
    position: absolute;
    top: 6px;
    right: 8px;
    color: var(--chatbot-muted);
}

.lwh-open-cbot .copy-text span {
    display: none;
    position: absolute;
    background-color: #fff;
    border-radius: 4px;
    padding: 0 6px 1px;
    color: #000;
    border: 1px solid var(--chatbot-line);
}

/* code snippets */
.lwh-open-cbot .chat__messages__ai .code-snippet { background-color: #1b1b1b; border-radius: 10px; }
.lwh-open-cbot .chat__messages__ai pre { display: flex; overflow: hidden; }

.lwh-open-cbot .chat__messages__ai code {
    display: block;
    padding: 10px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    color: #f8f8f8;
    overflow-x: auto;
    word-break: normal;
    white-space: pre;
    align-self: flex-start;
    text-align: left;
}

.lwh-open-cbot .snippet-header {
    background: #a4a4a4;
    border-radius: 10px 10px 0 0;
    padding: 6px 12px;
}

.lwh-open-cbot .snippet-header button { cursor: pointer; color: #373737; font-weight: 600; }

/* ---------- Quick reply chips ---------- */
.lwh-open-cbot .startup-btns,
.startup-btns {
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-start;
    place-content: flex-start;
    margin: 0;
    padding: 4px 14px 10px 14px;
    background: var(--chatbot-surface);
    z-index: 2;
}

.lwh-open-cbot .startup-btns p {
    padding: 7px 13px;
    border: 1px solid #D8DEE9;
    background: #fff;
    color: var(--chatbot-secondary-color);
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 500;
    width: fit-content;
    cursor: pointer;
    transition: all .2s ease;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.lwh-open-cbot .startup-btns p:hover {
    background-color: var(--chatbot-secondary-color);
    border-color: var(--chatbot-secondary-color);
    color: #fff;
    transform: translateY(-1px);
}

/* ---------- Input area ---------- */
.lwh-open-cbot .chat__input-area {
    padding: 10px 12px 12px 12px;
    position: relative;
    z-index: 1;
    background: #fff;
    border-top: 1px solid #ECEFF3;
}

.chat__input-area > form {
    border: none;
    border-radius: 0;
    padding: 0;
}

.lead-form-submit .chat__input-area > form {
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
}

.lwh-open-cbot .chat__input-area > form > div { display: flex; gap: 8px; align-items: center; }

form#messageForm .input { display: flex; flex-direction: column; gap: 5px; }

.lwh-open-cbot .chat__input-area .input {
    display: flex;
    gap: 6px;
    width: 100%;
    align-items: center;
}

#form-outer { display: flex; align-items: center; gap: 8px; }
div.form-outer { flex-direction: column; gap: 16px; align-items: stretch; }

.msg-input { width: 100%; background-color: #fff; }
.msg-input-lead-filled { margin: 0 !important; }

/* pill shaped message field */
.lwh-open-cbot .msg-input .wph-input,
.lwh-open-cbot .msg-input input#message {
    border-radius: 999px !important;
    background: #F3F4F7 !important;
    border: 1px solid #E4E7EE !important;
    padding: 12px 18px !important;
    font-size: 14px;
    transition: border-color .2s ease, background .2s ease;
}

.lwh-open-cbot .msg-input .wph-input:focus {
    background: #fff !important;
    border-color: var(--chatbot-secondary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, .10) !important;
    outline: none !important;
}

.lwh-open-cbot .msg-input .wph-label {
    top: 13px;
    left: 18px;
    font-size: 14px;
    color: #9AA1AC;
    background: transparent;
    transition: opacity .18s ease;
}

.lwh-open-cbot .msg-input .wph-input:focus ~ .wph-label,
.lwh-open-cbot .msg-input .wph-input.has-value ~ .wph-label,
.lwh-open-cbot .msg-input .wph-input:not(:placeholder-shown) ~ .wph-label {
    opacity: 0;
    top: 13px;
    font-size: 14px;
}

/* generic inputs (lead form) */
.wph-input {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    outline: none;
    background: #fff !important;
    border: 1px solid #D9DBE4 !important;
    border-radius: 10px !important;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.wph-input:focus {
    padding: 12px 14px !important;
    border-color: var(--chatbot-secondary-color) !important;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, .10);
}

.lwh-open-cbot .custom-chatbot input[type='text'],
input#phone {
    border: none;
    outline: none;
    box-shadow: none !important;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="number"]:focus {
    outline: none !important;
}

.wph-label {
    position: absolute;
    top: 12px;
    left: 12px;
    font-size: 14px;
    color: #9AA1AC;
    background-color: #fff;
    padding: 0 5px;
    transition: .25s ease;
    pointer-events: none;
}

.wph-input:focus ~ .wph-label,
.wph-input.has-value ~ .wph-label,
.wph-input:not(:placeholder-shown) ~ .wph-label {
    top: -9px;
    font-size: 11px;
    font-weight: 600;
    color: var(--chatbot-secondary-color);
}

.form-group { position: relative; margin-bottom: 1rem; }
div#leadCaptureFields { gap: 14px; display: flex; flex-direction: column; }
div#leadCaptureFields .form-group { margin-bottom: 0; }

.lwh-open-cbot .chat__input-area .input > div:nth-child(1),
.lwh-open-cbot .chat__input-area .input input { width: 100%; }

/* ---------- Buttons ---------- */
.lwh-open-cbot .custom-chatbot button {
    border: none;
    background: none;
    padding: 0 !important;
    cursor: pointer;
}

.lwh-open-cbot .custom-chatbot button > i { color: var(--chatbot-primary-color); font-size: 16px; }
.lwh-open-cbot .custom-chatbot button:hover i { color: var(--chatbot-hover-color); cursor: pointer; }

/* round send button (after lead captured) */
#button-div {
    display: flex;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #F5A623 0%, #E5940F 100%);
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(245, 166, 35, .35);
    transition: transform .2s ease, box-shadow .2s ease;
}

#button-div:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(245, 166, 35, .45); }
#button-div button { width: 100%; height: 100%; place-content: center; }
#button-div button i, #button-div button:hover i { color: #fff !important; font-size: 15px; }

/* full width buttons (lead form + new conversation) */
div.button-div {
    display: flex;
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, #F5A623 0%, #E5940F 100%);
    justify-content: center;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(245, 166, 35, .3);
    transition: transform .2s ease, box-shadow .2s ease;
}

div.button-div:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245, 166, 35, .4); }
div.button-div button { display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 14.5px; font-weight: 600; }
div.button-div button i, div.button-div button:hover i { color: #fff !important; }
.button-div span { display: block !important; color: #fff; }
button#submit-btn, button#start-btn { width: 100%; place-content: center; }

.lwh-open-cbot .custom-chatbot button[disabled] i { cursor: not-allowed; color: var(--chatbot-button-disabled-color); }
#button-div button[disabled] i { color: rgba(255, 255, 255, .7) !important; }

/* ---------- Lead capture form ---------- */
.lead-header-container {
    background: linear-gradient(135deg, #003366 0%, #00224A 100%);
    display: block;
    height: 78px;
    margin-bottom: -77px;
}

.lead-form-open .chat__input-area {
    border-top: none;
    background: var(--chatbot-surface);
    padding: 0 12px 14px 12px;
}

.lead-form-open .chat__input-area > form {
    border: 1px solid rgba(0, 51, 102, .08);
    border-radius: 14px;
    padding: 22px 16px 16px 16px;
    box-shadow: 0 10px 24px rgba(16, 24, 40, .10);
    margin: 12px 2px 2px 2px;
    background: #fff;
}

/* ---------- Overlays ---------- */
.lwh-open-cbot .loading {
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
    font-size: 14px;
    color: var(--chatbot-muted);
    background: rgba(255, 255, 255, .92);
    z-index: 5;
}

.lwh-open-cbot .loading p:first-child i { color: var(--chatbot-secondary-color); font-size: 22px; }

.lwh-open-cbot .popup {
    display: none;
    width: calc(100% - 24px);
    position: absolute;
    background-color: var(--chatbot-popup-bg-color);
    padding: 12px 14px;
    border-radius: 10px;
    top: 12px;
    left: 12px;
    opacity: 0;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(16, 24, 40, .18);
    z-index: 6;
}

.lwh-open-cbot .popup-animation { animation: slideInRight .5s ease forwards, fadeOut 2s ease forwards 3s; }
.lwh-open-cbot .popup p { color: var(--chatbot-popup-text-color); }
.lwh-open-cbot .popup .close-btn { position: absolute; top: 5px; right: 5px; cursor: pointer; }

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

/* ---------- Feedback modal ---------- */
.lwh-open-cbot .feedback-form {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(16, 24, 40, .22);
    position: absolute;
    width: calc(100% - 28px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 7;
    padding: 1rem;
    display: none;
    flex-direction: column;
    justify-content: space-between;
}

.lwh-open-cbot .feedback-form.show { display: flex; }

.lwh-open-cbot .feedback-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 0 .8rem 0;
    font-weight: 600;
    color: var(--chatbot-secondary-color);
}

.lwh-open-cbot .feedback-form form { display: flex; flex-direction: column; align-items: stretch; }

.lwh-open-cbot .feedback-form textarea {
    width: 100%;
    border: 1px solid #D9DBE4;
    border-radius: 10px;
    outline: none;
    padding: 10px;
    font-size: 14px;
    font-family: inherit;
}

.lwh-open-cbot .feedback-form textarea:focus { border-color: var(--chatbot-secondary-color); box-shadow: 0 0 0 3px rgba(0, 51, 102, .10); }

.lwh-open-cbot .feedback-form button {
    background: linear-gradient(135deg, #F5A623 0%, #E5940F 100%);
    padding: .75rem;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    margin-top: .6rem;
    font-size: 14px;
    font-weight: 600;
}

.lwh-open-cbot .feedback-form button[disabled] { cursor: not-allowed; background: var(--chatbot-button-disabled-color) !important; }
.lwh-open-cbot .feedback-form button:hover { filter: brightness(.96); }

.lwh-open-cbot .chat__export i:hover,
.lwh-open-cbot .copy-text i:hover,
.lwh-open-cbot .feedback-btn:hover,
.lwh-open-cbot .feedback__modal-close:hover { color: var(--chatbot-hover-color); cursor: pointer; }

.lwh-open-cbot .footer-area { padding: 0 12px 10px 12px; font-size: 11px; display: none; }
.lwh-open-cbot .footer-area a { text-decoration: none; }
.lwh-open-cbot .avatar-image { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .lwh-open-cbot .custom-chatbot { right: var(--chatbot-position-right-mob, var(--chatbot-position-right)) !important; }
    .lwh-open-cbot .custom-chatbot__image { right: var(--chatbot-image-position-right-mob, var(--chatbot-image-position-right)) !important; }
}

@media (max-width: 679px) {
    .lwh-open-cbot .custom-chatbot {
        position: fixed;
        top: auto;
        bottom: 14px;
        left: 10px !important;
        right: 10px !important;
        width: auto;
        transform: none;
    }
    .lwh-open-cbot, .lwh-open-cbot :root { --chatbot-height: 46vh; }
    .lwh-open-cbot .chat { border-radius: 16px; }
    .lwh-open-cbot .chat__messages__ai p,
    .lwh-open-cbot .chat__messages__user p { max-width: 84%; }
}

/* ---------- Fixes: full width submit inside lead form + message placeholder label ---------- */
#button-div.button-div {
    width: 100%;
    height: auto;
    border-radius: 12px;
    padding: 13px;
    box-shadow: 0 4px 12px rgba(245, 166, 35, .3);
}

#button-div.button-div button { width: 100%; height: auto; }

.lwh-open-cbot .msg-input .wph-input:not(:placeholder-shown) ~ .wph-label { opacity: 1; }

.lwh-open-cbot .msg-input .wph-input:focus ~ .wph-label,
.lwh-open-cbot .msg-input .wph-input.has-value ~ .wph-label { opacity: 0; }
