/* Monetization Styles for Affiliate Marketing and AdSense */

/* Affiliate Marketing Buttons */
.affiliate-buttons {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.affiliate-btn {
    background: #10b981;
    color: white !important;
    padding: 12px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
}

.affiliate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.affiliate-btn.shop-ingredients {
    background: #10b981;
}

.affiliate-btn.shop-ingredients:hover {
    background: #059669;
}

.affiliate-btn.meal-kit {
    background: #3b82f6;
}

.affiliate-btn.meal-kit:hover {
    background: #2563eb;
}

.affiliate-btn.kitchen-tools {
    background: #f59e0b;
}

.affiliate-btn.kitchen-tools:hover {
    background: #d97706;
}

/* Affiliate Section in Blog Posts */
.affiliate-section {
    margin: 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 4px solid #28a745;
    position: relative;
}

.affiliate-section h4 {
    color: #155724;
    margin-bottom: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.affiliate-section p {
    color: #155724;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.affiliate-section .disclaimer {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 15px;
    font-style: italic;
    line-height: 1.4;
}

.affiliate-buttons-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* AdSense Ad Containers */
.ad-container {
    max-width: 100%;
    overflow: hidden;
    margin: 25px 0;
    text-align: center;
    position: relative;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    padding: 15px;
}

.ad-container::before {
    content: "Advertisement";
    position: absolute;
    top: -8px;
    left: 15px;
    font-size: 10px;
    color: #6c757d;
    background: white;
    padding: 0 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* In-content ads for blog posts */
.in-content-ad {
    margin: 35px 0;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    padding: 20px;
}

/* Responsive Ad Controls */
@media (max-width: 768px) {
    .desktop-ad {
        display: none !important;
    }
    
    .mobile-ad {
        display: block;
    }
    
    .affiliate-buttons-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .affiliate-btn {
        width: 100%;
        justify-content: center;
        padding: 14px 18px;
        font-size: 0.9rem;
    }
    
    .affiliate-section {
        padding: 20px;
        margin: 30px 0;
    }
}

@media (min-width: 769px) {
    .desktop-ad {
        display: block;
    }
    
    .mobile-ad {
        display: none !important;
    }
}

/* Ingredient Link Styling */
.ingredients-list a {
    color: #2563eb !important;
    text-decoration: underline;
    text-decoration-color: rgba(37, 99, 235, 0.3);
    transition: all 0.2s ease;
}

.ingredients-list a:hover {
    text-decoration-color: rgba(37, 99, 235, 0.8);
    color: #1d4ed8 !important;
}

/* Revenue Analytics Styling */
.revenue-metric {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 10px 0;
}

.revenue-metric h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.revenue-metric p {
    margin: 5px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Mobile-first affiliate buttons */
.mobile-affiliate-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.mobile-affiliate-bar.show {
    display: flex;
    gap: 10px;
}

.mobile-affiliate-bar .affiliate-btn {
    flex: 1;
    justify-content: center;
    padding: 12px 16px;
    font-size: 0.85rem;
}

/* Affiliate performance indicators */
.affiliate-stats {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    color: #6c757d;
    margin-left: 8px;
}

.affiliate-stats .click-count {
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 12px;
    font-weight: 500;
}

/* Loading states for affiliate buttons */
.affiliate-btn.loading {
    opacity: 0.7;
    cursor: wait;
}

.affiliate-btn.loading::after {
    content: "...";
    animation: loading-dots 1.5s infinite;
}

@keyframes loading-dots {
    0%, 20% {
        content: "...";
    }
    40% {
        content: "..";
    }
    60% {
        content: ".";
    }
    80%, 100% {
        content: "...";
    }
}