/* Chargie Blog CTA - All 5 optimization styles */

/* ===== Option 1: Contextual CTA Box ===== */
.chargie-contextual-cta {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-left: 4px solid #22c55e;
    border-radius: 8px;
    padding: 20px 24px;
    margin: 32px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.chargie-cta-icon {
    font-size: 32px;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.chargie-cta-content {
    flex: 1;
    min-width: 0;
}

.chargie-cta-headline {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: #15803d;
    margin-bottom: 6px;
    line-height: 1.3;
}

.chargie-cta-body {
    font-size: 14px;
    color: #374151;
    line-height: 1.6;
    margin: 0 0 12px 0;
}

.chargie-cta-button {
    display: inline-block;
    background: #22c55e;
    color: #fff !important;
    text-decoration: none !important;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.chargie-cta-button:hover {
    background: #16a34a;
    color: #fff !important;
    text-decoration: none !important;
}

/* ===== Option 2: Sticky Bottom Bar ===== */
.chargie-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a2e;
    color: #fff;
    z-index: 9990;
    box-shadow: 0 -2px 20px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

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

.chargie-sticky-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.chargie-sticky-text {
    flex: 1;
    min-width: 0;
}

.chargie-sticky-text strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.chargie-sticky-sub {
    font-size: 13px;
    color: #94a3b8;
    display: block;
    margin-top: 2px;
}

.chargie-sticky-button {
    display: inline-block;
    background: #22c55e;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 24px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.chargie-sticky-button:hover {
    background: #16a34a;
    color: #fff !important;
}

.chargie-sticky-close {
    background: none;
    border: none;
    color: #64748b;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.2s;
}

.chargie-sticky-close:hover {
    color: #fff;
}

/* ===== Option 3: Exit-Intent Popup ===== */
.chargie-exit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.chargie-exit-overlay.visible {
    opacity: 1;
}

.chargie-exit-popup {
    background: #fff;
    border-radius: 12px;
    max-width: 440px;
    width: 90%;
    padding: 36px 32px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.chargie-exit-overlay.visible .chargie-exit-popup {
    transform: scale(1);
}

.chargie-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 28px;
    color: #94a3b8;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.chargie-popup-close:hover {
    color: #1e293b;
}

.chargie-popup-header {
    font-size: 22px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.chargie-popup-body {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.chargie-popup-form {
    display: flex;
    gap: 8px;
}

.chargie-popup-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
    color: #1e293b;
    background: #fff;
}

.chargie-popup-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.chargie-popup-submit {
    background: #22c55e;
    color: #fff;
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.chargie-popup-submit:hover {
    background: #16a34a;
}

.chargie-popup-fine {
    font-size: 12px;
    color: #94a3b8;
    margin: 10px 0 0 0;
}

.chargie-popup-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    margin-top: 16px;
}

/* ===== Option 4: Product Section ===== */
.chargie-product-section {
    margin: 48px 0 24px 0;
    padding-top: 32px;
    border-top: 1px solid #e5e7eb;
}

.chargie-product-header {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 20px;
}

.chargie-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.chargie-product-card {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.chargie-product-card:hover {
    border-color: #22c55e;
    box-shadow: 0 2px 12px rgba(34, 197, 94, 0.08);
}

.chargie-product-name {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2px;
}

.chargie-product-tagline {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 10px;
}

.chargie-product-desc {
    font-size: 14px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.chargie-product-price {
    font-size: 20px;
    font-weight: 700;
    color: #22c55e;
    margin-bottom: 12px;
}

.chargie-product-button {
    display: inline-block;
    background: #1e293b;
    color: #fff !important;
    text-decoration: none !important;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.chargie-product-button:hover {
    background: #334155;
    color: #fff !important;
}

.chargie-product-footer {
    text-align: center;
    font-size: 14px;
}

.chargie-product-footer a {
    color: #22c55e;
    text-decoration: none;
    font-weight: 500;
}

.chargie-product-footer a:hover {
    text-decoration: underline;
}

/* ===== Option 5: Auto-linked keywords ===== */
a.chargie-auto-link {
    color: #16a34a;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
}

a.chargie-auto-link:hover {
    text-decoration-style: solid;
    color: #15803d;
}

/* ===== Mobile responsive ===== */
@media (max-width: 640px) {
    .chargie-contextual-cta {
        flex-direction: column;
        gap: 10px;
        padding: 16px;
    }

    .chargie-cta-icon {
        font-size: 28px;
    }

    .chargie-sticky-inner {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 14px;
    }

    .chargie-sticky-text {
        flex: 1 1 100%;
    }

    .chargie-sticky-sub {
        display: none;
    }

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

    .chargie-exit-popup {
        padding: 28px 20px;
    }

    .chargie-popup-form {
        flex-direction: column;
    }

    .chargie-popup-header {
        font-size: 19px;
    }

    .chargie-product-grid {
        grid-template-columns: 1fr;
    }
}


/* Dynamic Product Card Enhancements (v1.2.0) */
.chargie-product-image {
    margin-bottom: 12px;
    text-align: center;
}
.chargie-product-image img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    border-radius: 8px;
}
.chargie-product-name a {
    color: inherit;
    text-decoration: none;
}
.chargie-product-name a:hover {
    color: #00a32a;
}
.chargie-product-rating {
    margin: 8px 0;
    font-size: 16px;
}
.chargie-star {
    margin-right: 1px;
}
.chargie-star-full {
    color: #f0ad4e;
}
.chargie-star-half {
    color: #f0ad4e;
    opacity: 0.6;
}
.chargie-star-empty {
    color: #ccc;
}
.chargie-review-count {
    font-size: 13px;
    color: #666;
    margin-left: 4px;
}
.chargie-price-regular {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: normal;
}
.chargie-price-sale {
    color: #e63946;
    font-size: 20px;
    font-weight: 700;
}
.chargie-price-current {
    color: #333;
    font-size: 20px;
    font-weight: 700;
}
