.website-assistant {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1005;
    color: #172033;
    font-family: "DM Sans", Arial, sans-serif;
}

.website-assistant button,
.website-assistant input,
.website-assistant textarea {
    font: inherit;
}

.website-assistant-toggle {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    gap: 9px;
    padding: 0 19px;
    border: 0;
    border-radius: 999px;
    background: #d4213a;
    box-shadow: 0 8px 26px rgba(30, 41, 59, .2);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.website-assistant-toggle span {
    font-size: 19px;
}

.website-assistant-panel {
    position: absolute;
    right: 0;
    bottom: 64px;
    display: flex;
    width: min(380px, calc(100vw - 32px));
    height: min(620px, calc(100dvh - 110px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .2);
}

.website-assistant-panel[hidden],
.website-assistant-lead[hidden],
.website-assistant-lead-trigger[hidden] {
    display: none;
}

.website-assistant-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    background: #111f33;
    color: #fff;
}

.website-assistant-header div {
    display: grid;
    gap: 3px;
}

.website-assistant-header strong {
    font-size: 15px;
}

.website-assistant-header small {
    color: #c7d2e1;
    font-size: 11px;
}

.website-assistant-close {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: white;
    font-size: 25px !important;
    cursor: pointer;
}

.website-assistant-messages {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    padding: 16px;
}

.website-assistant-message {
    max-width: 90%;
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.website-assistant-message.is-assistant {
    align-self: flex-start;
    background: #f1f5f9;
    color: #334155;
}

.website-assistant-message.is-visitor {
    align-self: flex-end;
    background: #fff0f1;
    color: #8f182a;
}

.website-assistant-message a,
.website-assistant-consent a {
    color: #bd1f34;
    font-weight: 700;
    text-decoration: underline;
}

.website-assistant-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 14px 10px;
}

.website-assistant-suggestions button,
.website-assistant-lead-trigger {
    padding: 7px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 11px;
    cursor: pointer;
}

.website-assistant-suggestions button:hover,
.website-assistant-lead-trigger:hover {
    border-color: #fda4af;
    color: #bd1f34;
}

.website-assistant-lead-trigger {
    align-self: flex-start;
    margin: 0 14px 10px;
}

.website-assistant-question {
    display: flex;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid #edf0f4;
}

.website-assistant-question input,
.website-assistant-lead input:not([type="checkbox"]),
.website-assistant-lead textarea {
    width: 100%;
    min-width: 0;
    padding: 10px 11px;
    border: 1px solid #dce1e9;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: 13px;
}

.website-assistant-question button,
.website-assistant-lead > button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    background: #d4213a;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.website-assistant-question button:disabled,
.website-assistant-lead > button:disabled {
    opacity: .6;
    cursor: wait;
}

.website-assistant-lead {
    display: grid;
    gap: 7px;
    padding: 0 14px 12px;
}

.website-assistant.is-lead-mode .website-assistant-messages,
.website-assistant.is-lead-mode .website-assistant-suggestions,
.website-assistant.is-lead-mode .website-assistant-lead-trigger,
.website-assistant.is-lead-mode .website-assistant-question {
    display: none;
}

.website-assistant.is-lead-mode .website-assistant-lead {
    display: grid;
    min-height: 0;
    flex: 1;
    overflow-y: auto;
    padding-top: 14px;
}

.website-assistant-lead > p {
    margin: 0 0 3px;
    color: #475569;
    font-size: 12px;
    line-height: 1.5;
}

.website-assistant-lead > label:not(.website-assistant-consent) {
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}

.website-assistant-lead textarea {
    resize: vertical;
}

.website-assistant-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.5;
}

.website-assistant-consent input {
    flex: 0 0 auto;
    margin-top: 2px;
    accent-color: #d4213a;
}

.website-assistant-disclaimer {
    display: block;
    padding: 0 14px 12px;
    color: #8490a2;
    font-size: 10px;
    line-height: 1.45;
}

@media (max-width: 600px) {
    .website-assistant {
        right: 12px;
        bottom: 12px;
    }

    .website-assistant-toggle {
        min-height: 48px;
        padding: 0 15px;
    }

    .website-assistant-panel {
        right: -4px;
        bottom: 58px;
        max-height: calc(100dvh - 86px);
    }
}
