/* Floating action buttons + chat widget */

.fab-stack {
    position: fixed;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: clamp(1rem, 3vw, 1.75rem);
    z-index: 900;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
}

.site-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.5rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.82rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid transparent;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    transition: background 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
    cursor: pointer;
    font-family: inherit;
    color: var(--text-main);
}

.chat-launch-fab {
    background: rgba(13, 242, 201, 0.14);
    border-color: rgba(13, 242, 201, 0.42);
}

.chat-launch-fab:hover,
.chat-launch-fab:focus-visible {
    background: rgba(13, 242, 201, 0.24);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(13, 242, 201, 0.18);
    outline: none;
}

.contact-sales-fab {
    background: rgba(139, 92, 246, 0.18);
    border-color: rgba(139, 92, 246, 0.45);
}

.contact-sales-fab:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(139, 92, 246, 0.2);
}

/* Chat panel */
.chat-widget {
    position: fixed;
    right: clamp(1rem, 3vw, 1.75rem);
    bottom: calc(clamp(1rem, 3vw, 1.75rem) + 7.5rem);
    width: min(100vw - 2rem, 380px);
    height: min(70vh, 520px);
    z-index: 901;
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.chat-widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(14, 20, 32, 0.95);
}

.chat-widget-header h2 {
    font-size: 0.95rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.chat-widget-header p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.chat-widget-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    padding: 0.15rem 0.35rem;
}

.chat-widget-close:hover {
    color: var(--text-main);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.chat-message {
    max-width: 88%;
}

.chat-message-user {
    align-self: flex-end;
}

.chat-message-assistant {
    align-self: flex-start;
}

.chat-bubble {
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    line-height: 1.5;
    border-radius: 12px;
    word-break: break-word;
}

.chat-message-user .chat-bubble {
    background: rgba(13, 242, 201, 0.15);
    border: 1px solid rgba(13, 242, 201, 0.28);
    border-bottom-right-radius: 4px;
}

.chat-message-assistant .chat-bubble {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom-left-radius: 4px;
    color: var(--text-main);
}

.chat-input-area {
    display: flex;
    gap: 0.5rem;
    padding: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(10, 15, 26, 0.95);
}

.chat-input-area input {
    flex: 1;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-input);
    color: var(--text-main);
    font: inherit;
    font-size: 0.88rem;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary) 0%, #0ab89e 100%);
    color: #010610;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}

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

@media (max-width: 640px) {
    .site-fab {
        padding: 0.75rem 1.15rem;
        font-size: 0.75rem;
    }

    .chat-widget {
        right: 0.75rem;
        left: 0.75rem;
        width: auto;
        bottom: calc(0.75rem + 7rem);
        height: min(62vh, 480px);
    }
}
