/* ============================================================================
   conviene/_bubble.css - Bubble globale "AI Advisor"
   Estetica brand: cerchio accent, no glow, no pulse continuo.
   ========================================================================== */

.conv-bubble {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
}
.conv-bubble.is-visible { opacity: 1; transform: translateY(0); }
@media (max-width: 600px) {
    .conv-bubble { bottom: 16px; right: 16px; }
}

.conv-bubble-trigger {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent, #2563eb);
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgb(0 0 0 / 0.1));
    font-size: 20px;
    position: relative;
    transition: transform .15s ease, background .15s ease;
}
.conv-bubble-trigger:hover {
    transform: scale(1.05);
    background: var(--accent-hover, #1d4ed8);
}
@media (max-width: 600px) {
    .conv-bubble-trigger { width: 48px; height: 48px; font-size: 18px; }
}
.conv-bubble-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--success, #10b981);
    border: 2px solid var(--bg-page, #f8fafc);
}
.conv-bubble-badge.buy { background: #ea580c; }
.conv-bubble-badge.neutral { background: #94a3b8; }

.conv-bubble-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    z-index: 9991;
    width: 360px;
    max-width: calc(100vw - 32px);
    background: var(--bg-surface, #fff);
    border-radius: var(--radius-lg, 16px);
    box-shadow: var(--shadow-xl, 0 20px 25px -5px rgb(0 0 0 / 0.1));
    overflow: hidden;
    animation: convBubblePanelIn .25s ease;
}
@media (max-width: 600px) {
    .conv-bubble-panel {
        position: fixed;
        inset: 0;
        bottom: 0; right: 0;
        width: 100%; max-width: none;
        border-radius: 0;
    }
}
@keyframes convBubblePanelIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.conv-bubble-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border, #e2e8f0);
}
.conv-bubble-title {
    font-family: var(--font-heading, 'Outfit', sans-serif);
    font-size: 16px;
    color: var(--primary, #181c26);
    font-weight: 700;
}
.conv-bubble-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.conv-bubble-body { padding: 20px; }
.conv-bubble-body h4 {
    font-family: var(--font-heading);
    font-size: 16px;
    color: var(--primary);
    margin-bottom: 8px;
}
.conv-bubble-body p {
    font-size: 14px;
    color: var(--text-main);
    line-height: 1.5;
    margin-bottom: 16px;
}
.conv-bubble-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.conv-bubble-form label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}
.conv-bubble-form select,
.conv-bubble-form input[type="range"] {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm, 8px);
    font-family: var(--font-body);
    font-size: 14px;
    background: var(--bg-surface);
}
.conv-bubble-cta {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: var(--radius-md, 12px);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    margin-top: 12px;
}
.conv-bubble-cta:hover { background: var(--accent-hover); }
.conv-bubble-secondary {
    background: transparent;
    color: var(--text-muted);
    border: none;
    padding: 8px 0;
    font-size: 12px;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 8px;
}
.conv-bubble-recap {
    background: var(--bg-page, #f8fafc);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    text-align: center;
}
.conv-bubble-recap-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.conv-bubble-recap-verdict {
    font-family: var(--font-heading);
    font-size: 22px;
    color: var(--primary);
    margin-bottom: 4px;
}
.conv-bubble-recap-delta {
    font-size: 13px;
    color: var(--text-muted);
}
.conv-bubble-divider {
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    margin: 16px 0;
    position: relative;
}
.conv-bubble-divider::before, .conv-bubble-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border);
}
.conv-bubble-divider::before { left: 0; }
.conv-bubble-divider::after { right: 0; }
