/**
 * Bongdalu Banner – frontend styles
 * Render logic lives in bongdalu-banner.js.
 * Add zone-specific CSS here as zones are implemented.
 */

/* ── Banner containers ───────────────────────────────────────── */
.bdl-slot {
    display: block;
    text-align: center;
}

.bdl-slot a {
    display: inline-block;
    line-height: 0;
}

.bdl-slot img {
    width: 100%;
    height: auto;
    display: block;
}

.bdl-slot-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.bdl-banner-before-header,
.bdl-notice-banner {
    width: 100%;
    max-width: 1200px;
    margin: 8px auto;
    padding: 0 10px;
    box-sizing: border-box;
}

.bdl-rail {
    position: fixed;
    top: 140px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 120px;
}

.bdl-balloon iframe {
    width: 200px;
    height: 200px;
    border: 0;
    display: block;
}
.bdl-rail-left {
    left: max(8px, calc((100vw - 1360px) / 2));
}

.bdl-rail-right {
    right: max(8px, calc((100vw - 1360px) / 2));
}

.bdl-rail .bdl-slot,
.bdl-rail ins,
.bdl-rail ins a {
    width: 100%;
    display: block;
}

.bdl-balloon {
    position: fixed;
    bottom: 90px;
    z-index: 9998;
    width: 160px;
}

.bdl-balloon-left {
    left: 10px;
}

.bdl-balloon-right {
    right: 10px;
}

.bdl-balloon .bdl-slot,
.bdl-balloon ins,
.bdl-balloon ins a {
    width: 100%;
    display: block;
}

/* ── Catfish (fixed bottom bar) ──────────────────────────────── */
.bdl-catfish {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: center;
    background: transparent;
    pointer-events: none;
}

.bdl-catfish > * {
    pointer-events: auto;
}

/* catfish-right + catfish--left shown side by side in one PC catfish bar */
.bdl-catfish-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.bdl-dual-wrapper {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;

    .bdl-slot {
        width: 100%;

        ins, a {
            display: block;
            width: 100%;
        }
    }
    img {
        height: 65px;
    }
    .bdl-slot--single img {
        height: auto;
        height: 65px;
    }
}

@media (min-width: 960px) {
    .bdl-catfish-pc {
        bottom: 20px;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 730px;
        margin: auto;
        gap: 4px;

        .bdl-slot, ins, ins a {
            width: 100%;
            display: block;
        }

        img {
            max-height: 60px;
            width: auto;
            margin: auto;
        }
    }
    
    .bdl-catfish-mb, #bdl_mobile_top_slot {
        display: none !important;
    }
}

@media (max-width: 959px) {
    .bdl-catfish-pc, .bdl-dual-wrapper {
        display: none !important;
    }

    .bdl-rail,
    .bdl-balloon {
        display: none !important;
    }

    .bdl-catfish-mb {
        bottom: 0;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        width: 100%;

        .bdl-slot {
            width: calc(100% - 20px);
            margin: 0 10px 4px;
        }

        ins, ins a {
            width: 100%;
            display: block;
        }
        img {
            max-height: 55px;
            width: 100%;
        }
    }

    #bdl_mobile_top_slot {
        margin: 0 10px;
        display: flex;
        flex-direction: column;
        gap: 4px;

        ins, ins a {
            width: 100%;
            display: block;
        }

        img {
            height: 55px;
        }
    }
}