/**
 * Consultor de Vendas — widget flutuante na landing pública.
 * Visual alinhado ao design-system (brand teal + accent).
 */

.sales-float-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cf244b 0%, #1c353e 100%);
    box-shadow: 0 4px 24px rgba(207, 36, 75, 0.45);
    border: none;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 26px;
}

.sales-float-button:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 32px rgba(207, 36, 75, 0.55);
}

.sales-float-button.hidden {
    display: none;
}

.sales-float-label {
    position: absolute;
    right: 72px;
    white-space: nowrap;
    background: rgba(15, 31, 37, 0.95);
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.08);
    pointer-events: none;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.2s, transform 0.2s;
}

.sales-float-button:hover .sales-float-label {
    opacity: 1;
    transform: translateX(0);
}

.sales-chat-window {
    position: fixed;
    bottom: 100px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 120px);
    background: #0f1f25;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 10002;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Inter', system-ui, sans-serif;
}

.sales-chat-window.open {
    display: flex;
    animation: salesSlideIn 0.28s ease;
}

@keyframes salesSlideIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.sales-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: linear-gradient(135deg, rgba(207, 36, 75, 0.25), rgba(28, 53, 62, 0.6));
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.sales-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sales-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cf244b, #1c353e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
}

.sales-header-text h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #f1f5f9;
}

.sales-header-text p {
    margin: 2px 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.sales-header-btn {
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    font-size: 16px;
}

.sales-header-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
}

.sales-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sales-message {
    max-width: 88%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 0.875rem;
    line-height: 1.5;
    word-break: break-word;
}

.sales-message.user {
    align-self: flex-end;
    background: linear-gradient(135deg, #cf244b, #a81d3d);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.sales-message.assistant {
    align-self: flex-start;
    background: rgba(28, 53, 62, 0.8);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom-left-radius: 4px;
}

.sales-message.assistant strong {
    color: #f8fafc;
}

.sales-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.sales-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s;
}

.sales-cta-btn.demo {
    background: rgba(207, 36, 75, 0.2);
    color: #fda4af;
    border: 1px solid rgba(207, 36, 75, 0.4);
}

.sales-cta-btn.checkout {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.35);
}

.sales-cta-btn:hover {
    opacity: 0.9;
}

.sales-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 8px;
}

.sales-quick-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    cursor: pointer;
}

.sales-quick-btn:hover {
    background: rgba(207, 36, 75, 0.15);
    border-color: rgba(207, 36, 75, 0.35);
}

.sales-chat-input-area {
    padding: 12px 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(0, 0, 0, 0.2);
}

.sales-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.sales-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 10px 14px;
    color: #f1f5f9;
    font-size: 0.875rem;
    resize: none;
    max-height: 100px;
    font-family: inherit;
}

.sales-input:focus {
    outline: none;
    border-color: rgba(207, 36, 75, 0.5);
}

.sales-send-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #cf244b, #a81d3d);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sales-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.sales-typing {
    display: flex;
    gap: 4px;
    padding: 10px 14px;
    align-self: flex-start;
}

.sales-typing span {
    width: 6px;
    height: 6px;
    background: #64748b;
    border-radius: 50%;
    animation: salesBounce 1.2s infinite;
}

.sales-typing span:nth-child(2) { animation-delay: 0.15s; }
.sales-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes salesBounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

@media (max-width: 480px) {
    .sales-chat-window {
        right: 16px;
        bottom: 90px;
        width: calc(100vw - 32px);
        height: calc(100vh - 110px);
    }
    .sales-float-label { display: none; }
}
