#lcea-chatbot-root {
    --lcea-primary: #80766b;
    --lcea-accent: #d8baa7;
    --lcea-text: #252321;
    --lcea-muted: #716d69;
    --lcea-border: #e8e3df;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 2147483000;
    width: auto;
    height: auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    color: var(--lcea-text);
    isolation: isolate;
}

#lcea-chatbot-root.lcea-position-left {
    right: auto;
    left: 22px;
}

#lcea-chatbot-root,
#lcea-chatbot-root * {
    box-sizing: border-box;
}

#lcea-chatbot-root [hidden] {
    display: none !important;
}

#lcea-chatbot-root button,
#lcea-chatbot-root textarea,
#lcea-chatbot-root a {
    font: inherit;
}

#lcea-chatbot-root button {
    -webkit-tap-highlight-color: transparent;
}

.lcea-launcher {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 60px;
    height: 54px;
    padding: 0 17px;
    border-radius: 999px;
    color: #fff;
    background: var(--lcea-primary);
    box-shadow: 0 12px 32px rgba(28, 25, 23, 0.24);
    cursor: pointer;
    user-select: none;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.lcea-launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px rgba(28, 25, 23, 0.28);
    filter: brightness(1.03);
}

.lcea-launcher:focus-visible,
.lcea-icon-button:focus-visible,
.lcea-chat-form button:focus-visible,
.lcea-quick-replies button:focus-visible,
.lcea-consultation:focus-visible {
    outline: 3px solid rgba(216, 186, 167, 0.65);
    outline-offset: 3px;
}

.lcea-launcher svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lcea-launcher span {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.lcea-launcher .lcea-close-icon {
    display: none;
}

.lcea-is-open .lcea-launcher .lcea-chat-icon,
.lcea-is-open .lcea-launcher span {
    display: none;
}

.lcea-is-open .lcea-launcher .lcea-close-icon {
    display: block;
}

.lcea-is-open .lcea-launcher {
    min-width: 54px;
    width: 54px;
    padding: 0;
}

.lcea-chat-window {
    position: absolute;
    right: 0;
    bottom: 68px;
    display: flex;
    flex-direction: column;
    width: min(390px, calc(100vw - 32px));
    height: min(610px, calc(100vh - 112px));
    min-height: 430px;
    overflow: hidden;
    border: 1px solid rgba(128, 118, 107, 0.16);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(34, 30, 27, 0.24);
    transform-origin: bottom right;
    animation: lcea-chat-open 180ms ease-out both;
}

.lcea-position-left .lcea-chat-window {
    right: auto;
    left: 0;
    transform-origin: bottom left;
}

@keyframes lcea-chat-open {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.lcea-chat-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    min-height: 74px;
    padding: 13px 14px;
    color: #fff;
    background: var(--lcea-primary);
}

.lcea-avatar {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.lcea-header-copy {
    min-width: 0;
}

.lcea-header-copy strong,
.lcea-header-copy span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lcea-header-copy strong {
    margin-bottom: 2px;
    color: #fff;
    font-size: 15px;
    line-height: 1.25;
}

.lcea-header-copy span {
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
}

.lcea-header-copy i {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: #8ee3a0;
    box-shadow: 0 0 0 3px rgba(142, 227, 160, 0.17);
    vertical-align: 1px;
}

.lcea-icon-button {
    all: unset;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 150ms ease;
}

.lcea-icon-button:hover {
    background: rgba(255, 255, 255, 0.15);
}

.lcea-icon-button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lcea-messages {
    flex: 1 1 auto;
    min-height: 0;
    padding: 18px 15px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fbfaf9;
    scrollbar-width: thin;
    scrollbar-color: #cfc8c2 transparent;
}

.lcea-messages::-webkit-scrollbar {
    width: 7px;
}

.lcea-messages::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: #cfc8c2;
}

.lcea-message {
    display: flex;
    width: 100%;
    margin: 0 0 11px;
}

.lcea-message-user {
    justify-content: flex-end;
}

.lcea-message-assistant {
    justify-content: flex-start;
}

.lcea-message-bubble {
    max-width: 84%;
    padding: 10px 13px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
}

.lcea-message-assistant .lcea-message-bubble {
    border: 1px solid var(--lcea-border);
    border-bottom-left-radius: 5px;
    color: var(--lcea-text);
    background: #fff;
    box-shadow: 0 3px 10px rgba(40, 35, 31, 0.04);
}

.lcea-message-user .lcea-message-bubble {
    border-bottom-right-radius: 5px;
    color: #fff;
    background: var(--lcea-primary);
}

.lcea-message-error .lcea-message-bubble {
    border-color: #f0c5c1;
    color: #8a2f29;
    background: #fff4f3;
}

.lcea-typing-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 34px;
    min-height: 12px;
}

.lcea-typing-dots i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lcea-muted);
    animation: lcea-dot 1.15s infinite ease-in-out;
}

.lcea-typing-dots i:nth-child(2) {
    animation-delay: 0.15s;
}

.lcea-typing-dots i:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes lcea-dot {
    0%, 70%, 100% { opacity: 0.35; transform: translateY(0); }
    35% { opacity: 1; transform: translateY(-3px); }
}

.lcea-quick-replies {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding: 9px 13px 5px;
    border-top: 1px solid #f0ece9;
    background: #fff;
}

.lcea-quick-replies button {
    all: unset;
    max-width: 100%;
    padding: 7px 10px;
    overflow: hidden;
    border: 1px solid #ddd6d0;
    border-radius: 999px;
    color: var(--lcea-primary);
    background: #fff;
    font-size: 12px;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
    cursor: pointer;
    transition: border-color 140ms ease, background 140ms ease;
}

.lcea-quick-replies button:hover {
    border-color: var(--lcea-accent);
    background: #faf6f3;
}

.lcea-consultation {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 7px 13px 4px;
    padding: 9px 12px;
    border-radius: 10px;
    color: var(--lcea-primary) !important;
    background: color-mix(in srgb, var(--lcea-accent) 25%, white);
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    text-decoration: none !important;
}

@supports not (background: color-mix(in srgb, red 10%, white)) {
    .lcea-consultation {
        background: #f5ebe5;
    }
}

.lcea-consultation:hover {
    color: var(--lcea-primary) !important;
    filter: brightness(0.98);
}

.lcea-consultation svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lcea-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 8px;
    margin: 0;
    padding: 9px 12px;
    border-top: 1px solid var(--lcea-border);
    background: #fff;
}

.lcea-chat-form textarea {
    display: block;
    width: 100%;
    min-height: 42px;
    max-height: 110px;
    margin: 0;
    padding: 10px 11px;
    resize: none;
    overflow-y: auto;
    border: 1px solid #dcd6d1;
    border-radius: 12px;
    outline: none;
    color: var(--lcea-text);
    background: #fff;
    box-shadow: none;
    font-size: 14px;
    line-height: 1.4;
}

.lcea-chat-form textarea:focus {
    border-color: var(--lcea-primary);
    box-shadow: 0 0 0 3px rgba(128, 118, 107, 0.12);
}

.lcea-chat-form textarea:disabled {
    opacity: 0.65;
}

.lcea-chat-form button[type="submit"] {
    all: unset;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: #fff;
    background: var(--lcea-primary);
    cursor: pointer;
    transition: transform 140ms ease, opacity 140ms ease;
}

.lcea-chat-form button[type="submit"]:hover:not(:disabled) {
    transform: translateY(-1px);
}

.lcea-chat-form button[type="submit"]:disabled {
    opacity: 0.55;
    cursor: wait;
}

.lcea-chat-form button svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.lcea-powered {
    padding: 0 12px 8px;
    color: #9a948f;
    background: #fff;
    font-size: 10px;
    line-height: 1.2;
    text-align: center;
}

.lcea-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#lcea-chatbot-root .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

@media (max-width: 480px) {
    #lcea-chatbot-root {
        right: 12px;
        bottom: 12px;
    }

    #lcea-chatbot-root.lcea-position-left {
        right: auto;
        left: 12px;
    }

    .lcea-chat-window {
        position: fixed;
        right: 12px;
        bottom: 78px;
        width: calc(100vw - 24px);
        height: min(680px, calc(100dvh - 94px));
        min-height: 400px;
        border-radius: 17px;
    }

    .lcea-position-left .lcea-chat-window {
        right: 12px;
        left: 12px;
    }

    .lcea-launcher {
        height: 52px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .lcea-chat-window,
    .lcea-launcher,
    .lcea-typing-dots i {
        animation: none !important;
        transition: none !important;
    }
}
