/* =============================================
   FEDERAL MOTORS — style-v2.css
   Melhorias de UX/CRO — Abril 2026
   ============================================= */

/* ─── 4. STICKY PROGRESS BAR (mobile) ─────── */
.sticky-progress {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 8px 16px;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.sticky-progress.visible {
    transform: translateY(0);
}

.sticky-progress-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 480px;
    margin: 0 auto;
}

.sticky-progress-bar {
    flex: 1;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 2px;
    overflow: hidden;
}

.sticky-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 8px rgba(245,158,11,0.4);
}

.sticky-progress-label {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .sticky-progress { display: block; }
    body { padding-top: 40px; }
}

/* ─── 1. LOADING CINEMATOGRÁFICO ─────── */
.loading-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: linear-gradient(135deg, #0a0f1e 0%, #111827 50%, #0a0f1e 100%);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
}

.loading-fullscreen.active {
    display: flex;
    animation: fadeInCinematic 0.6s ease;
}

@keyframes fadeInCinematic {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-cinematic-logo {
    margin-bottom: 30px;
}

.loading-cinematic-logo img {
    max-width: 200px;
    height: auto;
    animation: logoFloat 2s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.loading-cinematic-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 22px;
    font-weight: 900;
    color: #f1f5f9;
    margin-bottom: 8px;
}

.loading-cinematic-sub {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 35px;
}

/* Banco scanner */
.bank-scanner {
    width: 100%;
    max-width: 380px;
    margin-bottom: 30px;
}

.bank-scanner-title {
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.bank-scanner-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    transition: all 0.3s ease;
    opacity: 0.4;
}

.bank-item.active {
    opacity: 1;
    border-color: rgba(245,158,11,0.4);
    background: rgba(245,158,11,0.06);
    color: #f1f5f9;
}

.bank-item.active .bank-status {
    color: #f59e0b;
}

.bank-item.done {
    opacity: 1;
    border-color: rgba(16,185,129,0.3);
    background: rgba(16,185,129,0.06);
    color: #10b981;
}

.bank-item.done .bank-status {
    color: #10b981;
}

.bank-icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.bank-name {
    flex: 1;
    text-align: left;
}

.bank-status {
    font-size: 11px;
    font-weight: 700;
}

/* Counter animado */
.loading-counter {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 20px;
}

.loading-counter strong {
    color: #f59e0b;
    font-size: 18px;
}

/* Barra cinematográfica */
.cinematic-bar-wrap {
    width: 100%;
    max-width: 380px;
    height: 4px;
    background: rgba(255,255,255,0.08);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 12px;
}

.cinematic-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #10b981);
    border-radius: 2px;
    transition: width 0.3s ease;
    box-shadow: 0 0 12px rgba(245,158,11,0.5);
    width: 0%;
}

/* ─── 2. URGÊNCIA PÓS-APROVAÇÃO ─────── */
.urgency-post-approval {
    background: linear-gradient(135deg, rgba(239,68,68,0.12), rgba(239,68,68,0.04));
    border: 1px solid rgba(239,68,68,0.35);
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 20px 16px;
    text-align: center;
    animation: urgencyPulse 2s infinite;
}

@keyframes urgencyPulse {
    0%, 100% { border-color: rgba(239,68,68,0.35); box-shadow: 0 0 0 0 rgba(239,68,68,0.1); }
    50% { border-color: rgba(239,68,68,0.6); box-shadow: 0 0 20px 0 rgba(239,68,68,0.15); }
}

.urgency-post-approval i {
    color: #ef4444;
    font-size: 16px;
    margin-right: 6px;
}

.urgency-post-approval span {
    font-size: 13px;
    font-weight: 700;
    color: #fca5a5;
}

.urgency-post-approval strong {
    color: #ef4444;
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

/* WhatsApp pulsante */
.btn-wpp.urgent {
    animation: wppPulse 1.5s infinite;
}

@keyframes wppPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(37,211,102,0.3); }
    50% { transform: scale(1.03); box-shadow: 0 12px 40px rgba(37,211,102,0.5); }
}

/* ─── 3. EXIT-INTENT POPUP ─────── */
.exit-intent-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99998;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.exit-intent-overlay.active {
    display: flex;
    animation: fadeInOverlay 0.3s ease;
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

.exit-intent-popup {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 20px;
    padding: 35px 25px;
    max-width: 400px;
    width: 100%;
    text-align: center;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

@keyframes popIn {
    from { transform: scale(0.8) translateY(30px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.exit-intent-popup .popup-emoji {
    font-size: 48px;
    margin-bottom: 16px;
    display: block;
}

.exit-intent-popup h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 900;
    color: #f1f5f9;
    margin-bottom: 10px;
}

.exit-intent-popup p {
    font-size: 14px;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.exit-intent-popup .exit-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #0a0f1e;
    border: none;
    border-radius: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 25px rgba(245,158,11,0.35);
    margin-bottom: 10px;
}

.exit-intent-popup .exit-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(245,158,11,0.45);
}

.exit-intent-popup .exit-later {
    background: none;
    border: none;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
    padding: 8px;
    font-family: 'Inter', sans-serif;
}

.exit-intent-popup .exit-later:hover {
    color: #94a3b8;
}

/* ─── 5. MICRO-ANIMAÇÕES NOS BOTÕES ─────── */
.opt-btn {
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.opt-btn:active {
    transform: scale(0.97);
}

.opt-btn:hover {
    box-shadow: 0 4px 20px rgba(245,158,11,0.15), 0 0 0 1px rgba(245,158,11,0.2);
}

.btn-analyze:not(:disabled):hover {
    box-shadow: 0 15px 40px rgba(245,158,11,0.5), 0 0 30px rgba(245,158,11,0.15);
}

.btn-analyze:not(:disabled):active {
    transform: scale(0.98) translateY(0);
}

.btn-wpp:hover {
    box-shadow: 0 15px 40px rgba(37,211,102,0.5), 0 0 30px rgba(37,211,102,0.15);
}

/* Glow sutil nos inputs focus */
.input-row input:focus {
    box-shadow: 0 0 0 3px rgba(245,158,11,0.15), 0 4px 15px rgba(245,158,11,0.1);
}

/* ─── 7. BADGE APROVADO ANIMADO ─────── */
.aprovado-badge-animated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(16,185,129,0.15), rgba(16,185,129,0.05));
    border: 1px solid rgba(16,185,129,0.4);
    border-radius: 100px;
    padding: 6px 14px;
    font-size: 10px;
    font-weight: 800;
    color: #10b981;
    letter-spacing: 1px;
    animation: badgePop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both, badgeGlow 2s 0.6s infinite;
    margin-bottom: 12px;
}

@keyframes badgePop {
    from { transform: scale(0) rotate(-10deg); opacity: 0; }
    to { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes badgeGlow {
    0%, 100% { box-shadow: 0 0 10px rgba(16,185,129,0.2); }
    50% { box-shadow: 0 0 25px rgba(16,185,129,0.4); }
}

/* ─── 8. PERFORMANCE: partículas reduzidas ─────── */
@media (prefers-reduced-motion: reduce) {
    .particle { animation: none !important; opacity: 0 !important; }
    .bg-particles { display: none; }
}

/* ─── RESPONSIVIDADE ─────── */
@media (max-width: 400px) {
    .loading-cinematic-title { font-size: 18px; }
    .bank-item { padding: 8px 10px; font-size: 12px; }
    .exit-intent-popup { padding: 25px 18px; }
    .exit-intent-popup h3 { font-size: 17px; }
    .urgency-post-approval { margin: 0 14px 14px; padding: 12px 14px; }
}
