:root {
    --wasa-green: #0f9d58;
    --wasa-green-dark: #087443;
    --wasa-ink: #15202b;
    --wasa-muted: #68808f;
    --wasa-bg: #e7f7ee;
    --wasa-card: #ffffff;
    --wasa-shadow: 0 22px 55px rgba(15, 63, 37, 0.25);
}

.wasa-widget {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 99999;
    font-family: "Segoe UI", Tahoma, sans-serif;
}

.wasa-launcher {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--wasa-green), #18b766);
    color: #fff;
    box-shadow: var(--wasa-shadow);
    cursor: pointer;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
}

.wasa-launcher__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
}

.wasa-panel {
    width: min(380px, calc(100vw - 24px));
    height: min(640px, calc(100vh - 92px));
    display: none;
    flex-direction: column;
    overflow: hidden;
    border-radius: 24px;
    background: var(--wasa-card);
    box-shadow: var(--wasa-shadow);
    margin-top: 12px;
}

.wasa-widget[data-open="true"] .wasa-panel {
    display: flex;
}

.wasa-widget[data-open="true"] .wasa-launcher {
    display: none;
}

.wasa-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 18px 16px;
    color: #fff;
    background: linear-gradient(180deg, var(--wasa-green), var(--wasa-green-dark));
}

.wasa-panel__header p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.wasa-panel__close {
    border: 0;
    background: transparent;
    color: #fff;
    cursor: pointer;
    font-size: 28px;
    line-height: 1;
}

.wasa-messages {
    flex: 1;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(15, 157, 88, 0.08), transparent 28%),
        linear-gradient(180deg, #effaf3 0%, #f9fcfa 100%);
    padding: 18px;
}

.wasa-message {
    display: flex;
    margin-bottom: 12px;
}

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

.wasa-message__bubble {
    max-width: 85%;
    border-radius: 18px;
    padding: 12px 14px;
    white-space: pre-line;
    line-height: 1.45;
    font-size: 14px;
    color: var(--wasa-ink);
    box-shadow: 0 10px 24px rgba(19, 41, 32, 0.08);
}

.wasa-contact-cta {
    margin: 0 0 14px;
}
.wasa-contact-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 10px 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.wasa-contact-cta__button {
    width: 100%;
    color: #fff;
    background: linear-gradient(135deg, #16a34a, #0f9d58);
    box-shadow: 0 12px 24px rgba(15, 157, 88, 0.18);
}

.wasa-message--assistant .wasa-message__bubble {
    border-top-left-radius: 6px;
    background: #fff;
}

.wasa-message--user .wasa-message__bubble {
    border-top-right-radius: 6px;
    color: #fff;
    background: linear-gradient(135deg, #16a34a, #0f9d58);
}

.wasa-form {
    display: flex;
    align-items: end;
    gap: 10px;
    padding: 14px;
    border-top: 1px solid rgba(21, 32, 43, 0.08);
    background: #fff;
}

.wasa-form textarea {
    flex: 1;
    min-height: 48px;
    max-height: 150px;
    border: 1px solid rgba(21, 32, 43, 0.12);
    border-radius: 16px;
    padding: 12px 14px;
    resize: none;
    font: inherit;
    color: var(--wasa-ink);
    background: #fbfefd;
}

.wasa-form button {
    min-width: 88px;
    border: 0;
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    background: var(--wasa-green);
}

.wasa-typing .wasa-message__bubble {
    color: var(--wasa-muted);
}

@media (max-width: 640px) {
    .wasa-widget {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }

    .wasa-launcher {
        width: 100%;
        justify-content: center;
    }

    .wasa-panel {
        width: 100%;
        height: min(72vh, 640px);
    }
}
