/* Solusen Asistente - widget de chat */
.slsx-asistente {
    --slsx-green: #54b435;
    --slsx-green-dark: #2b7a1f;
    --slsx-green-deep: #1f5c18;
    --slsx-ink: #0f172a;
    --slsx-muted: #64748b;
    --slsx-border: #e5e7eb;
    --slsx-soft: #f6f8f4;
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--slsx-ink);
}

.slsx-asistente *,
.slsx-asistente *::before,
.slsx-asistente *::after {
    box-sizing: border-box;
}

.slsx-asistente [hidden] {
    display: none !important;
}

.slsx-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: linear-gradient(120deg, var(--slsx-green-deep) 0%, var(--slsx-green-dark) 55%, var(--slsx-green) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 14px 30px -12px rgba(31, 92, 24, .55);
    transition: transform .2s ease, box-shadow .2s ease;
}

.slsx-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px -12px rgba(31, 92, 24, .6);
}

.slsx-toggle:focus-visible,
.slsx-close:focus-visible,
.slsx-send:focus-visible,
.slsx-chip:focus-visible,
.slsx-msg__btn:focus-visible {
    outline: 3px solid rgba(84, 180, 53, .55);
    outline-offset: 2px;
}

.slsx-toggle__icon {
    display: inline-flex;
}

.slsx-panel {
    position: absolute;
    right: 0;
    bottom: calc(100% + 14px);
    display: flex;
    flex-direction: column;
    width: min(380px, calc(100vw - 32px));
    max-height: min(620px, calc(100vh - 130px));
    background: #fff;
    border: 1px solid var(--slsx-border);
    border-radius: 18px;
    box-shadow: 0 30px 70px -30px rgba(15, 23, 42, .45);
    overflow: hidden;
}

.slsx-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--slsx-ink) 0%, var(--slsx-green-deep) 100%);
    color: #fff;
}

.slsx-panel__eyebrow {
    margin: 0 0 3px;
    color: #a9ef8b;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.slsx-panel__title {
    margin: 0;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.slsx-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    background: rgba(255, 255, 255, .09);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.slsx-close:hover {
    background: rgba(255, 255, 255, .18);
}

.slsx-messages {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
    padding: 16px;
    background: #f8faf7;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.slsx-msg {
    display: flex;
    max-width: 88%;
}

.slsx-msg--bot {
    align-self: flex-start;
}

.slsx-msg--user {
    align-self: flex-end;
}

.slsx-msg__text {
    padding: 10px 13px;
    border: 1px solid var(--slsx-border);
    border-radius: 14px;
    background: #fff;
    color: var(--slsx-ink);
    font-size: .9rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.slsx-msg--user .slsx-msg__text {
    border-color: transparent;
    border-bottom-right-radius: 4px;
    background: var(--slsx-green-dark);
    color: #fff;
}

.slsx-msg--bot .slsx-msg__text {
    border-bottom-left-radius: 4px;
}

.slsx-msg__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 9px;
}

.slsx-msg__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid var(--slsx-green-dark);
    border-radius: 999px;
    background: #fff;
    color: var(--slsx-green-deep);
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}

.slsx-msg__btn:hover {
    background: #f2faee;
}

.slsx-msg__btn--call {
    border-color: transparent;
    background: var(--slsx-green-dark);
    color: #fff;
}

.slsx-msg__btn--call:hover {
    background: var(--slsx-green-deep);
}

.slsx-typing {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 12px 14px;
    border: 1px solid var(--slsx-border);
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    background: #fff;
}

.slsx-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--slsx-green-dark);
    opacity: .35;
    animation: slsx-blink 1.2s infinite ease-in-out;
}

.slsx-typing span:nth-child(2) {
    animation-delay: .15s;
}

.slsx-typing span:nth-child(3) {
    animation-delay: .3s;
}

@keyframes slsx-blink {
    0%, 80%, 100% { opacity: .25; transform: translateY(0); }
    40% { opacity: 1; transform: translateY(-2px); }
}

.slsx-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 16px 12px;
    background: #f8faf7;
}

.slsx-suggestions:empty {
    display: none;
}

.slsx-chip {
    padding: 7px 12px;
    border: 1px solid #cfe4c6;
    border-radius: 999px;
    background: #f2faee;
    color: var(--slsx-green-deep);
    font-family: inherit;
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.slsx-chip:hover {
    background: #e6f6dc;
}

.slsx-form {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 12px 14px;
    border-top: 1px solid var(--slsx-border);
    background: #fff;
}

.slsx-form textarea {
    flex: 1 1 auto;
    min-height: 42px;
    max-height: 110px;
    padding: 11px 12px;
    border: 1px solid var(--slsx-border);
    border-radius: 12px;
    background: #fff;
    color: var(--slsx-ink);
    font-family: inherit;
    font-size: .88rem;
    line-height: 1.4;
    resize: none;
}

.slsx-form textarea:focus {
    border-color: var(--slsx-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(84, 180, 53, .18);
}

.slsx-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--slsx-green-dark);
    color: #fff;
    cursor: pointer;
}

.slsx-send:hover {
    background: var(--slsx-green-deep);
}

.slsx-send:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.slsx-disclaimer {
    margin: 0;
    padding: 0 16px 12px;
    color: var(--slsx-muted);
    font-size: .68rem;
    line-height: 1.5;
}

.slsx-disclaimer a {
    color: var(--slsx-green-dark);
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 520px) {
    .slsx-asistente {
        right: 14px;
        bottom: 14px;
        left: 14px;
    }

    .slsx-toggle {
        margin-left: auto;
    }

    .slsx-panel {
        position: fixed;
        right: 12px;
        left: 12px;
        bottom: 78px;
        width: auto;
        max-height: min(70vh, 560px);
    }

    .slsx-toggle__label {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .slsx-asistente *,
    .slsx-asistente *::before,
    .slsx-asistente *::after {
        transition: none !important;
        animation: none !important;
    }
}

.slsx-msg--wide {
    max-width: 100%;
}

.slsx-contact {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-top: 11px;
    padding: 13px;
    border: 1px solid #cfe4c6;
    border-radius: 14px;
    background: #f2faee;
}

.slsx-contact__title {
    margin: 0;
    color: var(--slsx-green-deep);
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.35;
}

.slsx-contact__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--slsx-ink);
    font-size: .72rem;
    font-weight: 600;
}

.slsx-contact__field input,
.slsx-contact__field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--slsx-border);
    border-radius: 9px;
    background: #fff;
    color: var(--slsx-ink);
    font-family: inherit;
    font-size: .84rem;
    font-weight: 400;
    line-height: 1.4;
    resize: vertical;
}

.slsx-contact__field input:focus,
.slsx-contact__field textarea:focus {
    border-color: var(--slsx-green);
    outline: none;
    box-shadow: 0 0 0 3px rgba(84, 180, 53, .18);
}

.slsx-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--slsx-muted);
    font-size: .7rem;
    font-weight: 400;
    line-height: 1.45;
}

.slsx-consent input {
    margin-top: 2px;
    flex: 0 0 auto;
}

.slsx-consent a {
    color: var(--slsx-green-dark);
    font-weight: 600;
    text-decoration: underline;
}

.slsx-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.slsx-contact__submit {
    align-self: flex-start;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: var(--slsx-green-dark);
    color: #fff;
    font-family: inherit;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

.slsx-contact__submit:hover {
    background: var(--slsx-green-deep);
}

.slsx-contact__submit:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.slsx-contact__status {
    margin: 0;
    color: #b91c1c;
    font-size: .72rem;
    font-weight: 500;
    line-height: 1.4;
}

.slsx-contact__status:empty {
    display: none;
}

.slsx-contact__ok {
    margin: 0;
    color: var(--slsx-green-deep);
    font-size: .82rem;
    font-weight: 600;
    line-height: 1.45;
}
