.lcsa-container {
    --lcsa-cookie-offset: 0px;
    --lcsa-client-width: 100vw;
    --lcsa-max-height: min(560px, calc(100dvh - 116px - var(--lcsa-cookie-offset)));
    position: fixed;
    right: max(18px, env(safe-area-inset-right));
    bottom: calc(18px + var(--lcsa-cookie-offset));
    z-index: 9998;
    color: #17233c;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lcsa-toggle,
.lcsa-close,
.lcsa-send {
    appearance: none;
    border: 0;
    cursor: pointer;
    font: inherit;
}

.lcsa-toggle {
    display: grid;
    width: 58px;
    height: 58px;
    margin-left: auto;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #b3264b;
    box-shadow: 0 8px 24px rgba(36, 25, 53, .25);
    color: #fff;
    font-size: 1.4rem;
}

.lcsa-toggle:hover { background: #8f1839; }
.lcsa-toggle:focus-visible,
.lcsa-close:focus-visible,
.lcsa-send:focus-visible,
.lcsa-input:focus-visible,
.lcsa-sources a:focus-visible,
.lcsa-fallback:focus-visible {
    outline: 3px solid #f4bd38;
    outline-offset: 3px;
}

.lcsa-dialog {
    position: absolute;
    right: 0;
    bottom: 72px;
    display: flex;
    width: min(390px, calc(100vw - 36px));
    height: var(--lcsa-max-height);
    min-height: 360px;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgba(23, 35, 60, .18);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 18px 54px rgba(19, 21, 39, .28);
}

.lcsa-dialog[hidden] { display: none; }

.lcsa-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: #17345f;
    color: #fff;
}

.lcsa-title,
.lcsa-subtitle { margin: 0; }
.lcsa-title { font-weight: 750; line-height: 1.35; }
.lcsa-subtitle { margin-top: 3px; color: #e7edf7; font-size: .78rem; line-height: 1.35; }
.lcsa-close { padding: 1px 6px; background: transparent; color: #fff; font-size: 1.65rem; line-height: 1; }

.lcsa-messages {
    flex: 1;
    overflow: auto;
    padding: 16px;
    background: #f5f7fb;
    overscroll-behavior: contain;
}

.lcsa-message { display: flex; margin: 0 0 14px; flex-direction: column; align-items: flex-start; }
.lcsa-message-user { align-items: flex-end; }
.lcsa-bubble {
    max-width: 88%;
    padding: 11px 13px;
    border: 1px solid #dce3ef;
    border-radius: 14px 14px 14px 4px;
    background: #fff;
    color: #17233c;
    font-size: .91rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}
.lcsa-message-user .lcsa-bubble { border-color: #17345f; border-radius: 14px 14px 4px 14px; background: #17345f; color: #fff; }
.lcsa-message-pending .lcsa-bubble { color: #53627a; font-style: italic; }
.lcsa-sources { width: 100%; margin-top: 9px; font-size: .82rem; }
.lcsa-sources p { margin: 0 0 5px; font-weight: 700; }
.lcsa-sources ul { margin: 0; padding-left: 20px; }
.lcsa-sources li { margin: 4px 0; }
.lcsa-sources a,
.lcsa-fallback { color: #075da8; text-decoration-thickness: .08em; text-underline-offset: .15em; }
.lcsa-fallback { display: inline-block; margin-top: 9px; font-size: .82rem; }

.lcsa-form {
    display: flex;
    align-items: flex-end;
    gap: 9px;
    padding: 12px;
    border-top: 1px solid #dce3ef;
    background: #fff;
}
.lcsa-input {
    min-width: 0;
    min-height: 46px;
    max-height: 110px;
    flex: 1;
    resize: vertical;
    border: 1px solid #9aa8bc;
    border-radius: 12px;
    padding: 10px 12px;
    background: #fff;
    color: #17233c;
    font: inherit;
    font-size: .9rem;
    line-height: 1.4;
}
.lcsa-send {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    place-items: center;
    border-radius: 12px;
    background: #b3264b;
    color: #fff;
    font-weight: 750;
}
.lcsa-send:hover:not(:disabled) { background: #8f1839; }
.lcsa-send:disabled { cursor: not-allowed; opacity: .45; }

@media (max-width: 480px) {
    .lcsa-container { right: max(14px, env(safe-area-inset-right)); }
    .lcsa-dialog { width: calc(var(--lcsa-client-width) - 28px); min-height: 310px; }
}

@media (prefers-reduced-motion: reduce) {
    .lcsa-container * { scroll-behavior: auto !important; transition: none !important; }
}
