/**
 * Conversion Optimization Styles for Bravura Launch
 * Includes: Countdown timer, Exit popup, Purchase notifications, etc.
 */

/* =============================================================================
   1. COUNTDOWN TIMER
   ============================================================================= */

.countdown-timer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 2rem auto;
    max-width: 800px;
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
}

.countdown-header {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.urgency-icon {
    font-size: 2rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.countdown-display {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
}

.countdown-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    min-width: 80px;
}

.countdown-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    display: block;
}

.countdown-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
    margin-top: 0.25rem;
}

.countdown-separator {
    font-size: 2rem;
    font-weight: 700;
    opacity: 0.6;
}

.countdown-subtext {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-top: 1rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .countdown-timer {
        padding: 1.5rem 1rem;
    }

    .countdown-header {
        font-size: 1.2rem;
    }

    .countdown-display {
        gap: 0.5rem;
    }

    .countdown-unit {
        padding: 0.75rem 1rem;
        min-width: 60px;
    }

    .countdown-number {
        font-size: 1.8rem;
    }

    .countdown-label {
        font-size: 0.75rem;
    }

    .countdown-separator {
        font-size: 1.5rem;
    }
}

/* =============================================================================
   2. EXIT INTENT POPUP
   ============================================================================= */

.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.exit-popup-overlay.active {
    opacity: 1;
}

.exit-popup {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.exit-popup-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.exit-popup-close:hover {
    background: #f0f0f0;
    color: #333;
}

.exit-popup-content {
    padding: 3rem 2.5rem;
}

.exit-popup-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    text-align: center;
}

.exit-popup-lead {
    font-size: 1.3rem;
    text-align: center;
    color: #555;
    margin-bottom: 2rem;
}

.exit-popup-offer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 2rem;
    color: white;
    margin-bottom: 2rem;
}

.discount-badge {
    text-align: center;
    margin-bottom: 1.5rem;
}

.discount-percentage {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.discount-subtext {
    font-size: 1.1rem;
    opacity: 0.95;
}

.discount-details h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    text-align: center;
}

.discount-details ul {
    list-style: none;
    padding: 0;
}

.discount-details li {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.05rem;
}

.discount-details li:last-child {
    border-bottom: none;
}

.exit-popup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.exit-popup-input {
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1.1rem;
    transition: border-color 0.2s;
}

.exit-popup-input:focus {
    outline: none;
    border-color: #667eea;
}

.exit-popup-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.exit-popup-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.exit-popup-guarantee {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.exit-popup-timer {
    text-align: center;
    font-weight: 600;
    color: #e74c3c;
    font-size: 1.1rem;
}

/* Success state */
.exit-popup-success {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #27ae60;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 2rem;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.email-sent-to {
    font-weight: 600;
    color: #667eea;
    font-size: 1.1rem;
}

.discount-code-display {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin: 1.5rem 0;
    font-size: 1.2rem;
}

.discount-code-display strong {
    color: #667eea;
    font-size: 1.5rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .exit-popup-content {
        padding: 2rem 1.5rem;
    }

    .exit-popup-content h2 {
        font-size: 1.5rem;
    }

    .exit-popup-lead {
        font-size: 1.1rem;
    }

    .discount-percentage {
        font-size: 2rem;
    }
}

/* =============================================================================
   3. RECENT PURCHASES NOTIFICATION
   ============================================================================= */

.purchase-notification {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    background: linear-gradient(135deg, rgba(28, 48, 56, 0.98), rgba(20, 36, 42, 0.98));
    backdrop-filter: blur(20px);
    border-radius: 8px;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(32, 198, 183, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    padding: 1rem 1.25rem;
    max-width: 320px;
    z-index: 9999;
    transform: translateX(-400px);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    border-left: 3px solid;
    display: block;
    color: inherit;
    text-decoration: none;
}

.purchase-notification.active {
    transform: translateX(0);
}

.purchase-notification-content {
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.purchase-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    border: 1px solid;
    transition: all 0.2s;
}

.purchase-details {
    flex: 1;
}

.purchase-header {
    font-size: 0.7rem;
    margin-bottom: 0.3rem;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.purchase-info {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.purchase-time {
    font-size: 0.75rem;
    color: rgba(32, 198, 183, 0.8);
    font-weight: 500;
}

.purchase-notification-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
    line-height: 1;
}

.purchase-notification-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

/* Subtle glow on hover */
.purchase-notification:hover {
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(32, 198, 183, 0.5),
        0 0 30px rgba(32, 198, 183, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateX(0) translateY(-2px);
}

/* Make it clear it's clickable */
.purchase-notification:hover .purchase-info {
    color: rgba(255, 255, 255, 1);
}

/* Mobile positioning */
@media (max-width: 768px) {
    .purchase-notification {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
        max-width: none;
        padding: 0.875rem 1rem;
    }

    .purchase-icon {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .purchase-info {
        font-size: 0.875rem;
    }
}

/* =============================================================================
   4. SCROLL PROGRESS BAR
   ============================================================================= */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #20c6b7 0%, #f6b645 100%);
    box-shadow: 0 0 10px rgba(32, 198, 183, 0.5);
    z-index: 9998;
    transition: width 0.15s ease-out;
}

/* =============================================================================
   5. PRICING ENHANCEMENTS
   ============================================================================= */

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.4);
}

.pricing-card.professional {
    border: 3px solid #667eea;
    transform: scale(1.05);
    position: relative;
}

.pricing-savings {
    margin-top: 1rem;
}

.savings-badge {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* =============================================================================
   6. EMAIL CAPTURE FORMS
   ============================================================================= */

.email-capture-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto;
}

.email-capture-form input[type="email"] {
    flex: 1;
    padding: 1rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.email-capture-form input[type="email"]:focus {
    outline: none;
    border-color: #667eea;
}

.email-capture-form button {
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.email-capture-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.email-capture-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.subscription-success {
    text-align: center;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.subscription-success .success-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #27ae60;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .email-capture-form {
        flex-direction: column;
    }

    .email-capture-form button {
        width: 100%;
    }
}

/* =============================================================================
   7. LOADING STATES
   ============================================================================= */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* =============================================================================
   8. TOOLTIPS
   ============================================================================= */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    background-color: #2c3e50;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.85rem;
    white-space: nowrap;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* =============================================================================
   9. TRUST BADGES
   ============================================================================= */

.trust-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #666;
}

.trust-badge-icon {
    font-size: 1.5rem;
    color: #27ae60;
}

/* =============================================================================
   10. ANIMATIONS
   ============================================================================= */

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.bounce-in {
    animation: bounceIn 0.6s ease-out;
}

/* =============================================================================
   11. MOBILE-SPECIFIC OPTIMIZATIONS
   ============================================================================= */

@media (max-width: 768px) {
    /* Ensure all interactive elements are at least 44x44px for touch */
    button, a, input {
        min-height: 44px;
        min-width: 44px;
    }

    /* Increase font sizes for mobile readability */
    body {
        font-size: 16px;
    }

    /* Adjust spacing for mobile */
    .exit-popup,
    .purchase-notification {
        margin: 1rem;
    }
}

/* =============================================================================
   12. PRINT STYLES (hide conversion elements when printing)
   ============================================================================= */

@media print {
    .countdown-timer,
    .exit-popup-overlay,
    .purchase-notification,
    .scroll-progress,
    .email-capture-form {
        display: none !important;
    }
}
