/* Lightweight Dreame FAQ assistant. All widget styles are scoped. */
.dreame-faq-chat {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 88px; /* Keep clear of the site's Back to top button. */
    z-index: 1040; /* Below Bootstrap modals. */
    font-family: inherit;
    color: #242424;
}
.dreame-faq-chat.is-ready { display: block; }
.dreame-faq-chat [hidden] { display: none !important; }
.dreame-faq-chat *,
.dreame-faq-chat *::before,
.dreame-faq-chat *::after { box-sizing: border-box; }

.dreame-faq-chat__launcher {
    display: flex;
    gap: 9px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    min-height: 52px;
    padding: 11px 17px;
    border: 2px solid #ad8759;
    border-radius: 999px;
    color: #fff;
    background: #151515;
    box-shadow: 0 7px 25px rgba(0,0,0,.22);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.dreame-faq-chat__launcher i { font-size: 19px; }
.dreame-faq-chat__launcher:hover { background: #292929; color: #fff; }

.dreame-faq-chat__panel {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    position: absolute;
    right: 0;
    bottom: 65px;
    display: flex;
    flex-direction: column;
    width: min(390px, calc(100vw - 24px));
    height: min(630px, calc(100vh - 172px));
    max-height: calc(100vh - 172px);
    overflow: hidden;
    border: 1px solid #c8c8c8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 48px rgba(0,0,0,.24);
    text-align: left;
}
.dreame-faq-chat__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex: 0 0 auto;
    gap: 10px;
    padding: 15px 17px;
    background: #171717;
    color: #fff;
}
.dreame-faq-chat__header h2 {
    margin: 0 0 3px;
    color: #fff;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 700;
}
.dreame-faq-chat__header p {
    margin: 0;
    color: #e5d0b4;
    font-size: 12px;
    line-height: 1.4;
}
.dreame-faq-chat__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    padding: 0;
    border: 1px solid #676767;
    border-radius: 8px;
    color: #fff;
    background: transparent;
    cursor: pointer;
}
.dreame-faq-chat__close:hover { background: #373737; color: #fff; }

.dreame-faq-chat__messages {
    flex: 1 1 auto;
    min-height: 0;
    padding: 17px 14px;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #faf9f7;
    scroll-behavior: smooth;
}
.dreame-faq-chat__bubble {
    max-width: 92%;
    width: fit-content;
    margin: 0 0 13px;
    padding: 11px 13px;
    border: 1px solid #dbdbdb;
    border-radius: 12px 12px 12px 3px;
    background: #fff;
    color: #292929;
    font-size: 14px;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-line;
}
.dreame-faq-chat__bubble--user {
    margin-left: auto;
    border-color: #d8c4ac;
    border-radius: 12px 12px 3px 12px;
    background: #f1e6d6;
}
.dreame-faq-chat__bubble--bot { margin-right: auto; }
.dreame-faq-chat__answer { width: 100%; max-width: 100%; }
.dreame-faq-chat__answer-title {
    display: block;
    margin-bottom: 7px;
    font-weight: 700;
    line-height: 1.4;
}
.dreame-faq-chat__answer-body { margin: 0; white-space: pre-line; }
.dreame-faq-chat__answer-link,
.dreame-faq-chat__contact-link,
.dreame-faq-chat__choice {
    display: inline-block;
    margin-top: 11px;
    padding: 8px 11px;
    border: 1px solid #242424;
    border-radius: 7px;
    background: #222;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none !important;
    cursor: pointer;
}
.dreame-faq-chat__answer-link:hover,
.dreame-faq-chat__contact-link:hover,
.dreame-faq-chat__choice:hover { background: #424242; color: #fff !important; }
.dreame-faq-chat__contact-link {
    border-color: #87603a;
    background: #fff;
    color: #513418 !important;
}
.dreame-faq-chat__contact-link:hover { background: #f1e6d6; color: #30210f !important; }
.dreame-faq-chat__links { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.dreame-faq-chat__shortcuts { display: flex; flex-direction: column; align-items: start; gap: 7px; }
.dreame-faq-chat__shortcuts p { margin: 0 0 3px; font-size: 12px; color: #4f4f4f; }
.dreame-faq-chat__choice {
    margin-top: 0;
    max-width: 100%;
    padding: 8px 10px;
    border-color: #d1c2ac;
    background: #fff;
    color: #3a2b1e !important;
    text-align: left;
}
.dreame-faq-chat__choice:hover { background: #f5efe7; color: #1f1710 !important; }
.dreame-faq-chat__suggestions { display: flex; flex-direction: column; gap: 7px; margin: 6px 0 10px; }

.dreame-faq-chat__form {
    flex: 0 0 auto;
    margin: 0;
    padding: 11px 13px 9px;
    border-top: 1px solid #ddd;
    background: #fff;
}
.dreame-faq-chat__form label { display: block; margin: 0 0 5px; color: #303030; font-size: 12px; font-weight: 600; }
.dreame-faq-chat__input-row { display: flex; gap: 7px; }
.dreame-faq-chat__input-row input {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #787878;
    border-radius: 8px;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 14px;
}
.dreame-faq-chat__input-row input::placeholder { color: #666; }
.dreame-faq-chat__input-row button {
    flex: 0 0 43px;
    width: 43px;
    border: 0;
    border-radius: 8px;
    background: #222;
    color: #fff;
    font-size: 19px;
    cursor: pointer;
}
.dreame-faq-chat__input-row button:hover { background: #414141; }
.dreame-faq-chat__foot {
    flex: 0 0 auto;
    padding: 0 13px 11px;
    background: #fff;
    text-align: center;
}
.dreame-faq-chat__foot a { color: #69441d; font-size: 12px; font-weight: 600; text-decoration: underline; }
.dreame-faq-chat__foot a:hover { color: #362208; }

.dreame-faq-chat :is(button, a, input):focus-visible {
    outline: 3px solid #a46b22;
    outline-offset: 3px;
}
@media (max-width: 480px) {
    .dreame-faq-chat { right: 12px; bottom: 82px; }
    .dreame-faq-chat__panel {
        bottom: 63px;
        width: calc(100vw - 24px);
        height: calc(100vh - 167px);
        max-height: calc(100vh - 167px);
        border-radius: 13px;
    }
    .dreame-faq-chat__launcher { min-height: 49px; padding: 10px 14px; }
}
@supports (height: 100dvh) {
    .dreame-faq-chat__panel {
        height: min(630px, calc(100dvh - 172px));
        max-height: calc(100dvh - 172px);
    }
    @media (max-width: 480px) {
        .dreame-faq-chat__panel {
            height: calc(100dvh - 167px);
            max-height: calc(100dvh - 167px);
        }
    }
}
@media (max-height: 470px) {
    .dreame-faq-chat { bottom: 14px; }
    .dreame-faq-chat__panel { bottom: 60px; height: calc(100vh - 90px); max-height: calc(100vh - 90px); }
}
@media (prefers-reduced-motion: reduce) {
    .dreame-faq-chat__messages { scroll-behavior: auto; }
}
