/* ── Feature Interactive Visuals ──────────────────── */
/* Interactive on desktop, static on mobile            */

/* ── 1. AI Conversations: Animated Chat ──────────── */
.fv-chat {
    width: 100%;
    max-width: 320px;
    padding: 24px;
}

.fv-chat-phone {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.fv-chat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: rgba(0, 113, 227, 0.04);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.fv-chat-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0071e3, #4da6ff);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fv-chat-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.fv-chat-status {
    font-size: 11px;
    color: #30d158;
    line-height: 1.2;
}

.fv-chat-messages {
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 260px;
}

.fv-chat-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 12.5px;
    line-height: 1.45;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fv-chat-msg.visible {
    opacity: 1;
    transform: translateY(0);
}

.fv-chat-incoming {
    background: #f0f0f5;
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.fv-chat-outgoing {
    background: #0071e3;
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.fv-chat-typing {
    display: flex;
    gap: 4px;
    padding: 12px 16px;
    background: #f0f0f5;
    border-radius: 16px;
    border-bottom-left-radius: 6px;
    align-self: flex-start;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fv-chat-typing.visible {
    opacity: 1;
}

.fv-chat-typing span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #86868b;
    animation: fvTypingBounce 1.2s ease-in-out infinite;
}

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

@keyframes fvTypingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30% { transform: translateY(-4px); opacity: 1; }
}

.fv-chat-call {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #30d158, #34c759);
    color: #fff;
    border-radius: 12px;
    font-size: 12.5px;
    font-weight: 600;
    align-self: stretch;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fv-chat-call.visible {
    opacity: 1;
    transform: scale(1);
}

.fv-chat-call svg {
    width: 16px;
    height: 16px;
    fill: #fff;
}

/* Desktop hover: replay animation hint */
@media (min-width: 769px) {
    .fv-chat-phone {
        cursor: default;
        transition: box-shadow 0.3s ease;
    }

    .fv-chat-phone:hover {
        box-shadow: 0 12px 48px rgba(0, 113, 227, 0.12), 0 1px 3px rgba(0, 0, 0, 0.04);
    }
}


/* ── 2. Campaign Builder: Enhanced Steps ─────────── */
.fv-steps-enhanced {
    width: 100%;
    max-width: 340px;
    padding: 0 20px;
    position: relative;
}

.fv-steps-progress {
    position: absolute;
    left: 50px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    background: rgba(0, 113, 227, 0.1);
    z-index: 0;
}

.fv-steps-progress-fill {
    width: 100%;
    height: 0%;
    background: #0071e3;
    border-radius: 2px;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fv-step-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--bg-section);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.3s ease;
}

.fv-step-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.fv-step-card:last-child {
    margin-bottom: 0;
}

.fv-step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 113, 227, 0.08);
    color: #0071e3;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.4s ease, color 0.4s ease;
}

.fv-step-card.completed .fv-step-num {
    background: #0071e3;
    color: #fff;
}

.fv-step-info {
    flex: 1;
    min-width: 0;
}

.fv-step-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.fv-step-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.fv-step-check {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.fv-step-card.completed .fv-step-check {
    border-color: #30d158;
    background: #30d158;
}

.fv-step-check svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fv-step-card.completed .fv-step-check svg {
    opacity: 1;
}

/* Desktop hover for steps */
@media (min-width: 769px) {
    .fv-step-card:hover {
        box-shadow: 0 4px 20px rgba(0, 113, 227, 0.1);
    }
}


/* ── 3. Call Transfer: Animated Flow ─────────────── */
.fv-transfer {
    width: 100%;
    max-width: 380px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.fv-transfer-flow {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.fv-transfer-path {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fv-transfer-path.visible {
    opacity: 1;
    transform: translateY(0);
}

.fv-transfer-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.fv-transfer-row {
    display: flex;
    align-items: center;
    gap: 0;
}

.fv-transfer-node {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
}

.fv-transfer-node svg {
    width: 22px;
    height: 22px;
}

.fv-transfer-node-ai {
    background: linear-gradient(135deg, rgba(0, 113, 227, 0.1), rgba(0, 113, 227, 0.15));
}

.fv-transfer-node-ai svg {
    stroke: #0071e3;
    fill: none;
    stroke-width: 1.8;
}

.fv-transfer-node-lead {
    background: linear-gradient(135deg, rgba(120, 75, 250, 0.1), rgba(120, 75, 250, 0.15));
}

.fv-transfer-node-lead svg {
    stroke: #784bfa;
    fill: none;
    stroke-width: 1.8;
}

.fv-transfer-node-team {
    background: linear-gradient(135deg, rgba(48, 209, 88, 0.1), rgba(48, 209, 88, 0.15));
}

.fv-transfer-node-team svg {
    stroke: #30d158;
    fill: none;
    stroke-width: 1.8;
}

.fv-transfer-line {
    flex: 1;
    height: 2px;
    background: rgba(0, 0, 0, 0.06);
    position: relative;
    min-width: 40px;
    overflow: hidden;
}

.fv-transfer-line-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #0071e3, #30d158);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fv-transfer-path.active .fv-transfer-line-fill {
    width: 100%;
}

.fv-transfer-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0071e3;
    top: -3px;
    left: -8px;
    opacity: 0;
}

.fv-transfer-path.active .fv-transfer-dot {
    opacity: 1;
    animation: fvDotTravel 1.2s ease-in-out forwards;
}

@keyframes fvDotTravel {
    0% { left: -8px; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { left: calc(100% + 0px); opacity: 0; }
}

.fv-transfer-node-label {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
    text-align: center;
    margin-top: 6px;
}

.fv-transfer-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    align-self: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.fv-transfer-badge.visible {
    opacity: 1;
    transform: scale(1);
}

.fv-transfer-badge-connected {
    background: rgba(48, 209, 88, 0.1);
    color: #30d158;
}

.fv-transfer-badge-connected svg {
    width: 14px;
    height: 14px;
    stroke: #30d158;
    fill: none;
    stroke-width: 2;
}


/* ── 4. Compliance: Enhanced Shield ──────────────── */
.fv-compliance {
    position: relative;
    width: 240px;
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fv-compliance-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(0, 113, 227, 0.08);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fv-compliance-ring.visible {
    opacity: 1;
    transform: scale(1);
}

.fv-compliance-ring:nth-child(1) {
    inset: 0;
    animation: fvComplianceSpin 30s linear infinite;
}

.fv-compliance-ring:nth-child(2) {
    inset: 24px;
    border-color: rgba(0, 113, 227, 0.12);
    animation: fvComplianceSpin 25s linear infinite reverse;
}

.fv-compliance-ring:nth-child(3) {
    inset: 48px;
    border-color: rgba(0, 113, 227, 0.16);
}

@keyframes fvComplianceSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fv-compliance-tag {
    position: absolute;
    font-size: 9px;
    font-weight: 600;
    color: #0071e3;
    background: rgba(0, 113, 227, 0.06);
    padding: 3px 8px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fv-compliance-tag.visible {
    opacity: 1;
}

.fv-compliance-tag:nth-of-type(1) { top: -2px; left: 50%; transform: translateX(-50%); }
.fv-compliance-tag:nth-of-type(2) { top: 25%; right: -8px; }
.fv-compliance-tag:nth-of-type(3) { bottom: 25%; right: -12px; }
.fv-compliance-tag:nth-of-type(4) { bottom: -2px; left: 50%; transform: translateX(-50%); }
.fv-compliance-tag:nth-of-type(5) { bottom: 25%; left: -10px; }
.fv-compliance-tag:nth-of-type(6) { top: 25%; left: -6px; }

.fv-compliance-center {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fv-compliance-center.visible {
    opacity: 1;
    transform: scale(1);
}

.fv-compliance-center svg {
    filter: drop-shadow(0 2px 8px rgba(0, 113, 227, 0.2));
}

.fv-compliance-check {
    font-size: 11px;
    font-weight: 600;
    color: #30d158;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fv-compliance-check svg {
    width: 14px;
    height: 14px;
    stroke: #30d158;
    fill: none;
    stroke-width: 2.5;
    filter: none;
}


/* ── Mobile: Static visuals ──────────────────────── */
@media (max-width: 768px) {
    .fv-chat {
        max-width: 280px;
        padding: 16px;
    }

    .fv-chat-messages {
        min-height: auto;
    }

    /* Show all messages immediately on mobile */
    .fv-chat-msg,
    .fv-chat-call {
        opacity: 1 !important;
        transform: none !important;
    }

    .fv-chat-typing {
        display: none;
    }

    .fv-steps-enhanced {
        max-width: 100%;
    }

    .fv-step-card {
        opacity: 1 !important;
        transform: none !important;
    }

    .fv-step-card.completed .fv-step-num,
    .fv-step-card.completed .fv-step-check {
        transition: none;
    }

    .fv-transfer {
        max-width: 100%;
    }

    .fv-transfer-path {
        opacity: 1 !important;
        transform: none !important;
    }

    .fv-transfer-path.active .fv-transfer-line-fill {
        width: 100%;
        transition: none;
    }

    .fv-transfer-badge {
        opacity: 1 !important;
        transform: none !important;
    }

    .fv-transfer-dot {
        display: none;
    }

    .fv-compliance-ring,
    .fv-compliance-center,
    .fv-compliance-tag {
        opacity: 1 !important;
        transform: scale(1) !important;
    }

    .fv-compliance-ring:nth-child(1),
    .fv-compliance-ring:nth-child(2) {
        animation: none;
    }

    .fv-compliance {
        width: 200px;
        height: 200px;
    }
}
