/* Conversion Booster - Frontend Styles */

:root {
    --cb-primary: #2c5530;
    --cb-secondary: #4a7c4e;
    --cb-sticky-bg: #2c5530;
    --cb-sticky-text: #ffffff;
}

/* ========================================
   Exit Intent Popup
   ======================================== */

.cb-exit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cb-exit-overlay.cb-visible {
    opacity: 1;
    visibility: visible;
}

.cb-exit-popup {
    background: white;
    border-radius: 16px;
    padding: 40px;
    max-width: 440px;
    width: 90%;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.cb-exit-overlay.cb-visible .cb-exit-popup {
    transform: scale(1) translateY(0);
}

.cb-exit-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 5px;
    transition: color 0.2s;
}

.cb-exit-close:hover {
    color: #333;
}

.cb-exit-content {
    text-align: center;
}

.cb-exit-content h3 {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #1a1a1a;
    font-weight: 700;
}

.cb-exit-content p {
    font-size: 16px;
    color: #666;
    margin: 0 0 25px 0;
    line-height: 1.6;
}

.cb-exit-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-exit-form input[type="email"] {
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.cb-exit-form input[type="email"]:focus {
    border-color: var(--cb-primary);
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.cb-exit-form button,
.cb-exit-button {
    background: var(--cb-primary);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cb-exit-form button:hover,
.cb-exit-button:hover {
    background: var(--cb-secondary);
    transform: translateY(-1px);
}

.cb-exit-dismiss {
    display: block;
    margin-top: 15px;
    color: #999;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.2s;
}

.cb-exit-dismiss:hover {
    color: #666;
}

.cb-exit-success {
    padding: 20px 0;
}

.cb-checkmark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--cb-primary);
    color: white;
    border-radius: 50%;
    font-size: 30px;
    margin-bottom: 20px;
}

.cb-exit-success h3 {
    margin: 0 0 10px 0;
}

.cb-exit-success p {
    margin: 0;
}

/* ========================================
   Sticky CTA Bar
   ======================================== */

.cb-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--cb-sticky-bg);
    color: var(--cb-sticky-text);
    padding: 12px 20px;
    z-index: 99998;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

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

.cb-sticky-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.cb-sticky-text {
    font-size: 15px;
    font-weight: 500;
}

.cb-sticky-button {
    background: white;
    color: var(--cb-sticky-bg);
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
}

.cb-sticky-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--cb-sticky-bg);
}

.cb-sticky-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--cb-sticky-text);
    opacity: 0.7;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    line-height: 1;
}

.cb-sticky-close:hover {
    opacity: 1;
}

/* ========================================
   Social Proof Notifications
   ======================================== */

.cb-social-proof {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    z-index: 99997;
    max-width: 340px;
    transform: translateX(-120%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

.cb-social-proof.cb-visible {
    transform: translateX(0);
}

.cb-social-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--cb-primary), var(--cb-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cb-social-content {
    flex: 1;
    min-width: 0;
}

.cb-social-message {
    display: block;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}

.cb-social-time {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.cb-social-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: #ccc;
    font-size: 18px;
    cursor: pointer;
    padding: 2px;
    line-height: 1;
    opacity: 0;
    transition: opacity 0.2s;
}

.cb-social-proof:hover .cb-social-close {
    opacity: 1;
}

.cb-social-close:hover {
    color: #999;
}

/* ========================================
   Scroll Progress CTA
   ======================================== */

.cb-scroll-cta {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 99996;
    transform: translateX(calc(100% + 40px));
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

.cb-scroll-cta.cb-visible {
    transform: translateX(0);
}

.cb-scroll-text {
    font-size: 15px;
    color: #333;
    font-weight: 500;
}

.cb-scroll-button {
    background: var(--cb-primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, transform 0.2s;
    white-space: nowrap;
}

.cb-scroll-button:hover {
    background: var(--cb-secondary);
    transform: translateY(-1px);
    color: white;
}

.cb-scroll-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #666;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
    line-height: 1;
}

.cb-scroll-cta:hover .cb-scroll-close {
    opacity: 1;
}

.cb-scroll-close:hover {
    background: #333;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 768px) {
    .cb-exit-popup {
        padding: 30px 25px;
        margin: 15px;
    }

    .cb-exit-content h3 {
        font-size: 24px;
    }

    .cb-sticky-bar {
        padding: 10px 15px;
    }

    .cb-sticky-content {
        gap: 12px;
    }

    .cb-sticky-text {
        font-size: 13px;
        text-align: center;
        flex: 1 1 100%;
    }

    .cb-sticky-button {
        padding: 8px 16px;
        font-size: 13px;
    }

    .cb-sticky-close {
        right: 10px;
        font-size: 20px;
    }

    .cb-social-proof {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }

    .cb-scroll-cta {
        left: 10px;
        right: 10px;
        bottom: 70px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .cb-scroll-text {
        flex: 1 1 100%;
        text-align: center;
        margin-bottom: 5px;
    }
}

/* ========================================
   Shortcode Elements - Inline Styles
   ======================================== */

.cb-inline-cta {
    background: linear-gradient(135deg, var(--cb-primary), var(--cb-secondary));
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: 30px 0;
}

.cb-inline-cta h4 {
    font-size: 22px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.cb-inline-cta p {
    margin: 0 0 20px 0;
    opacity: 0.9;
}

.cb-inline-cta a {
    display: inline-block;
    background: white;
    color: var(--cb-primary);
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cb-inline-cta a:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.cb-trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    padding: 20px 0;
}

.cb-trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
}

.cb-trust-badge svg {
    color: var(--cb-primary);
}

.cb-countdown {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}

.cb-countdown-label {
    font-size: 14px;
    color: #856404;
    margin-bottom: 10px;
}

.cb-countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.cb-countdown-unit {
    text-align: center;
}

.cb-countdown-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #856404;
}

.cb-countdown-text {
    font-size: 12px;
    color: #856404;
    opacity: 0.8;
}

/* Animation for attention */
@keyframes cb-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.cb-inline-cta.cb-animated {
    animation: cb-pulse 2s ease-in-out infinite;
}

/* Prevent body scroll when popup is open */
body.cb-popup-open {
    overflow: hidden;
}

/* Highlight shortcode */
.cb-highlight {
    background: linear-gradient(120deg, rgba(44, 85, 48, 0.2) 0%, rgba(74, 124, 78, 0.2) 100%);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

/* Static Social Proof shortcode */
.cb-social-static {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.cb-social-static-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--cb-primary), var(--cb-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.cb-social-static-content {
    display: flex;
    flex-direction: column;
}

.cb-social-static-count {
    font-size: 24px;
    font-weight: 700;
    color: var(--cb-primary);
    line-height: 1.2;
}

.cb-social-static-text {
    font-size: 14px;
    color: #666;
}

/* Print styles - hide all conversion elements */
@media print {
    .cb-exit-overlay,
    .cb-sticky-bar,
    .cb-social-proof,
    .cb-scroll-cta {
        display: none !important;
    }
}
