/* CRO High-Performance Styles */

/* Body Offset for Sticky Header */
body.has-sticky-bar {
    padding-top: 48px !important;
}

/* 1. Sticky Scarcity Top Bar */
.cro-sticky-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background: linear-gradient(90deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.cro-sticky-bar .timer-badge {
    background: rgba(0, 0, 0, 0.25);
    padding: 4px 10px;
    border-radius: 6px;
    font-family: monospace;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fef08a;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cro-sticky-bar .cro-btn-top {
    background: #facc15;
    color: #000000;
    padding: 4px 14px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.cro-sticky-bar .cro-btn-top:hover {
    transform: scale(1.05);
    background: #fde047;
}

@media (max-width: 768px) {
    .cro-sticky-bar {
        font-size: 12px;
        gap: 8px;
        padding: 0 8px;
    }
    .cro-sticky-bar .cro-btn-top {
        display: none;
    }
}

/* 2. Live Social Proof Toast Popups */
.cro-toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99998;
    background: #ffffff;
    color: #1f2937;
    padding: 12px 16px;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    border: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    max-width: 340px;
    font-family: 'Inter', system-ui, sans-serif;
}

.cro-toast-container.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.cro-toast-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    border: 2px solid #dbeafe;
}

.cro-toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cro-toast-title {
    font-size: 13px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.cro-toast-subtitle {
    font-size: 12px;
    color: #4b5563;
    margin: 0;
}

.cro-toast-time {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

@media (max-width: 640px) {
    .cro-toast-container {
        left: 12px;
        bottom: 12px;
        max-width: calc(100% - 84px);
    }
}

/* 3. Exit Intent Popup Modal */
.cro-exit-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: 'Inter', system-ui, sans-serif;
}

.cro-exit-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.cro-exit-modal {
    background: #ffffff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 32px 24px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cro-exit-modal-overlay.active .cro-exit-modal {
    transform: scale(1);
}

.cro-exit-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

.cro-exit-badge {
    background: #fef2f2;
    color: #dc2626;
    font-weight: 700;
    font-size: 12px;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cro-exit-title {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.cro-exit-description {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.cro-exit-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 16px;
    padding: 16px 20px;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cro-exit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.4);
}

.cro-exit-footer {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

/* 4. WhatsApp Floating Button */
.cro-whatsapp-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99997;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cro-whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.cro-whatsapp-btn svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

/* 5. Trust Micro-Copy Under CTAs */
.cro-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
    font-size: 12px;
    color: #4b5563;
    font-weight: 500;
}

.cro-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* 6. Pix Checkout Modal Styles */
.pix-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.pix-modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.pix-modal-container {
    background: #ffffff;
    border-radius: 20px;
    max-width: 520px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.pix-modal-overlay.active .pix-modal-container {
    transform: scale(1);
}

.pix-modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #ffffff;
    padding: 24px;
    position: relative;
}

.pix-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #94a3b8;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s ease, color 0.2s ease;
}

.pix-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.pix-modal-badge {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pix-modal-title {
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #ffffff;
}

.pix-modal-price-tag {
    font-size: 28px;
    font-weight: 900;
    color: #22c55e;
    margin: 0;
}

.pix-modal-body {
    padding: 24px;
    background: #ffffff;
}

.pix-form-group {
    margin-bottom: 16px;
}

.pix-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.pix-form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    font-size: 14px;
    color: #0f172a;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.pix-form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.pix-form-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}

.pix-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(22, 163, 74, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pix-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(22, 163, 74, 0.4);
}

.pix-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Spinner Loading */
.pix-spinner {
    animation: rotate 2s linear infinite;
    width: 20px;
    height: 20px;
}

.pix-spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Step de Resultado do Pix */
.pix-result-container {
    text-align: center;
    display: none;
}

.pix-qrcode-box {
    background: #f8fafc;
    border: 2px dashed #cbd5e1;
    border-radius: 16px;
    padding: 16px;
    margin: 16px 0;
    display: inline-block;
}

.pix-qrcode-img {
    width: 200px;
    height: 200px;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

.pix-code-field {
    width: 100%;
    padding: 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 12px;
    font-family: monospace;
    color: #334155;
    margin-bottom: 12px;
    resize: none;
    box-sizing: border-box;
}

.pix-copy-btn {
    width: 100%;
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.pix-copy-btn:hover {
    background: #1d4ed8;
}

.pix-copy-btn.copied {
    background: #16a34a;
}

