/* Assistente comercial — sales pages e landing */
.sales-assistant {
    --sales-navy: #071428;
    --sales-deep: #0a1935;
    --sales-core: #163b7f;
    --sales-ink: #0a1935;
    --sales-muted: #5b6b86;
    --sales-font-display: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    --sales-font-body: 'IBM Plex Sans', ui-sans-serif, system-ui, sans-serif;

    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 9999;
    font-family: var(--sales-font-body);
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 0.65rem;
}

.sales-assistant-launcher {
    border: 0;
    cursor: pointer;
    border-radius: 999px;
    padding: 0.85rem 1.15rem;
    background: linear-gradient(135deg, var(--sales-deep), var(--sales-core) 55%, #0b7eab);
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    box-shadow: 0 12px 28px -12px rgb(7 20 40 / 0.55);
}

.sales-assistant-launcher:hover {
    filter: brightness(1.06);
}

.sales-assistant-launcher[hidden] {
    display: none !important;
}

.sales-assistant-panel {
    width: min(400px, calc(100vw - 1.5rem));
    max-height: min(85vh, 680px);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgb(22 59 127 / 0.15);
    border-radius: 1rem;
    box-shadow: 0 24px 48px -24px rgb(7 20 40 / 0.45);
    overflow: hidden;
    margin-bottom: 0.65rem;
}

.sales-assistant-panel[hidden] {
    display: none !important;
}

.sales-assistant-header {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    background: var(--sales-navy);
    color: #fff;
}

.sales-assistant-title {
    margin: 0;
    font-family: var(--sales-font-display);
    font-weight: 700;
    font-size: 1rem;
}

.sales-assistant-sub {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    color: rgb(255 255 255 / 0.72);
}

.sales-assistant-close {
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
}

.sales-assistant-messages {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    background: #f7fafc;
    min-height: 96px;
}

.sales-assistant-msg {
    max-width: 90%;
    padding: 0.55rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.4;
    white-space: pre-wrap;
}

.sales-assistant-msg--assistant {
    align-self: flex-start;
    background: #fff;
    border: 1px solid rgb(22 59 127 / 0.12);
    color: var(--sales-ink);
}

.sales-assistant-msg--user {
    align-self: flex-end;
    background: var(--sales-core);
    color: #fff;
}

.sales-assistant-msg--pending {
    opacity: 0.7;
    font-style: italic;
}

.sales-assistant-compose {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem;
    border-top: 1px solid rgb(22 59 127 / 0.1);
    flex-shrink: 0;
}

.sales-assistant-compose-hint {
    margin: 0;
    font-size: 0.68rem;
    color: var(--sales-muted);
}

.sales-assistant-compose textarea,
.sales-assistant-escalate input,
.sales-assistant-escalate textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 1px solid rgb(22 59 127 / 0.2);
    border-radius: 0.5rem;
    padding: 0.55rem 0.65rem;
    font: inherit;
    font-size: 0.9rem;
    line-height: 1.35;
    resize: vertical;
    box-sizing: border-box;
    background: #fff !important;
    color: #0a1935 !important;
    caret-color: #0a1935;
    -webkit-text-fill-color: #0a1935;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sales-assistant-compose textarea::placeholder,
.sales-assistant-escalate input::placeholder,
.sales-assistant-escalate textarea::placeholder {
    color: #5b6b86 !important;
    -webkit-text-fill-color: #5b6b86;
    opacity: 1;
}

.sales-assistant-compose textarea:focus,
.sales-assistant-escalate input:focus,
.sales-assistant-escalate textarea:focus {
    outline: 2px solid rgb(0 174 239 / 0.45);
    outline-offset: 1px;
    border-color: #00aeef;
    background: #fff !important;
    color: #0a1935 !important;
    -webkit-text-fill-color: #0a1935;
}

.sales-assistant .sales-btn-primary {
    display: inline-block;
    border: 0;
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
    background: linear-gradient(135deg, var(--sales-deep), var(--sales-core));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.sales-assistant-compose .sales-btn-primary,
.sales-assistant-escalate .sales-btn-primary {
    width: 100%;
    text-align: center;
}

.sales-assistant-escalate-wrap {
    padding: 0 0.75rem 0.75rem;
    flex-shrink: 0;
    max-height: min(48vh, 320px);
    overflow-x: hidden;
    overflow-y: auto;
}

.sales-assistant-escalate-toggle {
    width: 100%;
    border: 1px dashed rgb(22 59 127 / 0.35);
    background: transparent;
    color: var(--sales-core);
    border-radius: 0.5rem;
    padding: 0.5rem;
    font-weight: 600;
    cursor: pointer;
}

.sales-assistant-escalate {
    display: grid;
    gap: 0.45rem;
    margin-top: 0.55rem;
    width: 100%;
    min-width: 0;
}

.sales-assistant-escalate[hidden] {
    display: none !important;
}

.sales-assistant-escalate-lead {
    margin: 0;
    font-size: 0.82rem;
    color: var(--sales-muted);
}

.sales-assistant-contact-reveal {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--sales-ink);
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sales-assistant-contact-reveal a {
    color: var(--sales-core);
    display: inline;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.sales-assistant-footer {
    margin: 0;
    padding: 0.45rem 0.85rem 0.7rem;
    font-size: 0.72rem;
    color: var(--sales-muted);
    border-top: 1px solid rgb(22 59 127 / 0.08);
    flex-shrink: 0;
}

.sales-assistant-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.sales-skip {
    position: absolute;
    left: -9999px;
}

@media (max-width: 520px) {
    .sales-assistant {
        right: 0.65rem;
        bottom: 0.65rem;
    }

    .sales-assistant-launcher-label {
        font-size: 0.85rem;
    }
}
