/**
 * CSS khusus untuk memperbaiki masalah dengan AdSense dan iklan yang diblokir
 * LangkahKata.com
 */

/* Container untuk AdSense */
.adsbygoogle-container {
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    overflow: hidden;
    text-align: center;
    position: relative;
    z-index: 1;
    min-height: 100px; /* Minimal height saat iklan dimuat */
    padding: 10px 0;
    transition: all 0.3s ease;
}

.adsbygoogle-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f9f9f9;
    border-radius: 10px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

/* Style saat iklan terblokir */
.ad-blocked-container {
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 10px;
    border: 1px solid #eee;
}

.ad-blocked-container::before {
    content: 'Iklan mungkin diblokir atau tidak dapat dimuat';
    font-size: 14px;
    color: #888;
    text-align: center;
    padding: 20px;
}

/* Style untuk container AdSense */
.adsbygoogle-container ins {
    display: block;
    margin: 0 auto;
    background-color: transparent;
}

/* Fallback ketika AdSense terdeteksi terblokir */
.adsbox {
    width: 1px;
    height: 1px;
    position: absolute;
    top: -999px;
    left: -999px;
}

/* Perbaikan untuk Mode Kutip */
html.quirks-mode,
body.quirks-mode-body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    min-height: 100vh;
}

body.quirks-mode-body {
    display: flex;
    flex-direction: column;
}

/* Perbaikan untuk konten yang terpengaruh CSP */
iframe {
    max-width: 100%;
    border: 0;
}

/* Fix untuk perangkat mobile */
html.mobile-device .adsbygoogle-container {
    margin: 15px auto;
}

/* Animasi loading untuk AdSense */
@keyframes adLoad {
    0% { opacity: 0.3; }
    50% { opacity: 0.5; }
    100% { opacity: 0.3; }
}

.adsbygoogle-container.loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0, #f8f8f8, #f0f0f0);
    background-size: 200% 100%;
    animation: adLoad 1.5s infinite;
    border-radius: 10px;
}

/* Gaya notifikasi copy */
.copy-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Media queries */
@media (max-width: 768px) {
    .adsbygoogle-container {
        margin: 15px auto;
        min-height: 80px;
    }
    
    .ad-blocked-container::before {
        font-size: 12px;
        padding: 15px;
    }
    
    .copy-notification {
        padding: 8px 15px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .adsbygoogle-container {
        margin: 10px auto;
        min-height: 60px;
    }
    
    .ad-blocked-container::before {
        padding: 10px;
    }
}

/* Perbaikan overflow */
body {
    overflow-x: hidden;
}

/* Perbaikan untuk modal dan konten yang muncul secara dinamis */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    width: 500px;
    overflow: hidden;
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: #777;
    padding: 5px;
}

.modal-close:hover {
    color: #333;
} 