/**
 * BLOG MONETIZATION CSS
 * Styling cho các tính năng kiếm tiền từ blog
 */

/* Ad containers */
.ad-container {
    margin: 30px 0;
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.ad-container::before {
    content: "Quảng cáo";
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ad-top { margin-top: 20px; }
.ad-middle { margin: 40px 0; }
.ad-bottom { margin-bottom: 20px; }

/* Product recommendation cards */
.product-recommendation {
    margin: 30px 0;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.product-card {
    display: flex;
    gap: 20px;
    align-items: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.product-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.product-info h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
}

.product-info p {
    margin: 0 0 15px 0;
    opacity: 0.9;
}

.product-price {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 15px;
}

.buy-button {
    display: inline-block;
    background: #ff6b6b;
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.buy-button:hover {
    background: #ee5a5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Affiliate disclaimer */
.affiliate-disclaimer {
    font-size: 11px;
    color: #6c757d;
    text-align: center;
    margin-top: 10px;
    font-style: italic;
}

/* Email signup CTA */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    color: white;
    margin: 40px 0;
}

.cta-section h3 {
    margin: 0 0 15px 0;
    font-size: 1.6em;
}

.email-signup {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 20px auto 0;
}

.email-signup input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
}

.cta-button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: #ee5a5a;
    transform: translateY(-2px);
}

/* Social sharing buttons */
.social-sharing {
    margin: 40px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
    text-align: center;
}

.sharing-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.share-btn.facebook {
    background: #3b5998;
    color: white;
}

.share-btn.zalo {
    background: #0068ff;
    color: white;
}

.share-btn.copy {
    background: #6c757d;
    color: white;
}

/* Special content boxes */
.binh-quote {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin: 30px 0;
    border-left: 5px solid #ffd700;
    position: relative;
}

.binh-quote::before {
    content: """;
    font-size: 4em;
    color: #ffd700;
    position: absolute;
    top: -10px;
    left: 20px;
    line-height: 1;
}

.binh-quote p {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    font-style: italic;
}

.binh-quote cite {
    font-weight: bold;
    color: #ffd700;
}

.warning-box, .tips-box {
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
}

.warning-box {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    color: #856404;
}

.tips-box {
    background: #d1ecf1;
    border-left: 5px solid #17a2b8;
    color: #0c5460;
}

.tips-box ul {
    margin: 0;
    padding-left: 20px;
}

.tips-box li {
    margin-bottom: 10px;
}

/* Related posts section */
.related-posts {
    margin: 50px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 12px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.related-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-card-content {
    padding: 15px;
}

.related-card h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.related-card p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
}

/* Comments section */
.comments-section {
    margin: 50px 0;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
    outline: none;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    border-color: #667eea;
}

.submit-comment {
    background: #667eea;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.submit-comment:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .product-card {
        flex-direction: column;
        text-align: center;
    }
    
    .product-card img {
        width: 100px;
        height: 100px;
    }
    
    .email-signup {
        flex-direction: column;
    }
    
    .sharing-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .related-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading animation for ads */
.ad-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    background: #f8f9fa;
    border-radius: 8px;
}

.ad-loading::after {
    content: "";
    width: 30px;
    height: 30px;
    border: 3px solid #e9ecef;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Newsletter success message */
.newsletter-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    display: none;
}

/* Sticky affiliate banner */
.sticky-affiliate {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    z-index: 1000;
    max-width: 300px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.sticky-affiliate.show {
    transform: translateX(0);
}

.sticky-affiliate .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/* AdSense responsive units */
.adsbygoogle {
    display: block !important;
    margin: 20px auto !important;
    text-align: center !important;
}

/* Print styles - hide ads when printing */
@media print {
    .ad-container,
    .cta-section,
    .social-sharing,
    .sticky-affiliate {
        display: none !important;
    }
}