/**
 * Bincang Ads Frontend Stylesheet
 * Premium modern aesthetics (Glassmorphism, animations, soft shadows, responsive layouts)
 */

:root {
    --bads-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --bads-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --bads-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --bads-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Base Ad Slot and Containers */
.bincang-ads-slot {
    display: block;
    margin: 20px auto;
    text-align: center;
    clear: both;
    width: 100%;
    max-width: 100%;
}

.bincang-ad-wrapper {
    display: inline-block;
    max-width: 100%;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bincang-ad-wrapper:hover {
    transform: translateY(-2px);
}

.bincang-ad-img {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--bads-shadow-md);
    margin: 0 auto;
}

/* Video Ad Containers */
.bincang-ad-video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: var(--bads-shadow-lg);
}

.bincang-ad-video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.bincang-ad-video-player {
    width: 100%;
    max-width: 640px;
    border-radius: 8px;
    box-shadow: var(--bads-shadow-lg);
    display: block;
    margin: 0 auto;
}

/* 1. Lightbox Popup modal */
.bincang-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.bincang-popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.bincang-popup-box {
    background: #ffffff;
    padding: 16px;
    border-radius: 16px;
    position: relative;
    max-width: 90%;
    max-height: 90%;
    box-shadow: var(--bads-shadow-xl);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bincang-popup-overlay.is-active .bincang-popup-box {
    transform: scale(1);
}

.bincang-popup-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e293b;
    color: #ffffff;
    border: 2px solid #ffffff;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bads-shadow-md);
    z-index: 10;
    transition: background 0.2s ease;
}

.bincang-popup-close:hover {
    background: #ef4444;
}

.bincang-popup-content img {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    border-radius: 8px;
}

/* 2. Sticky Bottom Screen-wide Banner */
.bincang-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 24px;
    z-index: 99999;
    box-shadow: 0 -10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.bincang-sticky-footer.is-active {
    transform: translateY(0);
}

.bincang-sticky-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.bincang-sticky-close {
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: #ef4444;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.bincang-sticky-close:hover {
    background: #dc2626;
}

.bincang-sticky-container img {
    max-width: calc(100% - 40px);
    height: auto;
    max-height: 90px;
    border-radius: 4px;
}

/* 3. Floating Left/Right Sidebar banners (Melayang) */
.bincang-floating-sidebar {
    position: fixed;
    top: 150px;
    z-index: 9999;
    width: 160px;
    padding: 8px;
    background: transparent;
    transition: transform 0.3s ease;
}

.bincang-floating-sidebar.floating-left {
    left: 20px;
}

.bincang-floating-sidebar.floating-right {
    right: 20px;
}

.bincang-floating-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 24px;
    height: 24px;
    background: #1e293b;
    color: #ffffff;
    border: 1px solid #ffffff;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--bads-shadow-sm);
}

.bincang-floating-close:hover {
    background: #ef4444;
}

.bincang-floating-sidebar img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: var(--bads-shadow-lg);
}

/* AdBlock Warning Dialog */
.bincang-adblock-warning {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bincang-adblock-box {
    background: #ffffff;
    padding: 32px;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    text-align: center;
    box-shadow: var(--bads-shadow-xl);
    border: 1px solid #e2e8f0;
}

.bincang-adblock-icon {
    font-size: 48px;
    color: #ef4444;
    margin-bottom: 16px;
    line-height: 1;
}

.bincang-adblock-title {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 12px;
}

.bincang-adblock-message {
    font-size: 15px;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 24px;
}

.bincang-adblock-btn {
    display: inline-block;
    padding: 12px 32px;
    background: #6366f1;
    color: #ffffff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
    cursor: pointer;
    border: none;
}

.bincang-adblock-btn:hover {
    background: #4f46e5;
}

/* Responsive Hide Rules for Floating Sidebars */
@media (max-width: 1280px) {
    .bincang-floating-sidebar {
        display: none !important; /* Hide floats on smaller screens to prevent overlapping content */
    }
}
