/**
 * 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_notice_banner.gwd_notification {
    margin: 0 -15px 10px;
    display: flex;
    align-items: center;
    background-color: #fdf2f2;
    border: 1px solid #ffcccc;
    border-radius: 4px;
    padding: 10px;
    width: calc(100% + 30px);
    max-width: none !important;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    position: relative;
    height: 50px;
}

#bdl_notice_banner .gwd-dynamic-html-container {
    display: flex;
    gap: 3px;
    align-items: center;
    width: 100%;
}

#bdl_notice_banner .gwd-dynamic-html-wrapper {
    overflow: hidden;
    flex-grow: 1;
    position: relative;
    line-height: 1;
}

#bdl_notice_banner .gwd-dynamic-html-wrapper .bdl-slot {
    display: inline-block;
}

#bdl_notice_banner .gwd-dynamic-html-wrapper ins {
    display: inline-block;
    white-space: nowrap;
    animation: bdl-scroll-left 40s linear infinite;
    padding-right: 20px;
    margin-right: 15px;
    border-right: 1px solid #000;
}

#bdl_notice_banner .gwd-dynamic-html-wrapper a {
    color: #fb2b1c;
    font-weight: 600;
    text-decoration: none;
}

#bdl_notice_banner .gwd-dynamic-html-wrapper:hover ins,
#bdl_notice_banner.paused .gwd-dynamic-html-wrapper ins {
    animation-play-state: paused;
}

#bdl_notice_banner .notification-banner-close {
    position: absolute;
    right: 0;
    top: 50%;
    width: 40px;
    height: 100%;
    border: none;
    background: #fdf2f2;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
    transform: translate(0%, -50%);
    margin-right: 0;
    margin-bottom: 0;
}

@keyframes bdl-scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.bdl-rail {
    position: fixed;
    top: 120px;
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 120px;
}

#left_gutter.bdl-rail,
#right_gutter.bdl-rail {
    position: fixed !important;
    top: 120px !important;
    width: 120px !important;
    height: auto !important;
    margin: 0 !important;
    z-index: 9998 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
}

.bdl-rail-left {
    left: 8px;
}

.bdl-rail-right {
    right: 8px;
}

#left_gutter.bdl-rail {
    left: 8px;
    right: auto;
}

#right_gutter.bdl-rail {
    right: 8px;
    left: auto;
}

.bdl-rail .bdl-slot,
.bdl-rail ins,
.bdl-rail ins a {
    width: 120px;
    display: block;
}

.bdl-rail img {
    width: 120px;
    max-width: 120px;
    height: auto;
}

@media (max-width: 1599px) {
    .bdl-rail {
        display: none !important;
    }
}

.bdl-balloon {
    position: fixed;
    bottom: 15px;
    z-index: 999999;
    width: 200px;
    height: 200px;
}

.bdl-balloon-left {
    left: 20px;
}

.bdl-balloon-right {
    right: 20px;
}

.bdl-balloon .bdl-slot,
.bdl-balloon ins,
.bdl-balloon ins a {
    width: 200px;
    height: 200px;
    display: block;
}

.bdl-balloon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bdl-balloon-close {
    position: absolute;
    top: -10px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #111827;
    color: #ffffff;
    font-size: 22px;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.bdl-balloon-close--left {
    left: -10px;
}

.bdl-balloon-close--right {
    right: -10px;
}

/* ── 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-left + catfish-right shown side by side in one PC catfish bar */
.bdl-catfish-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.bdl-catfish-item {
    width: 522px;
    max-width: calc((100% - 12px) / 2);
    height: 65px;
}

.bdl-catfish-item .bdl-slot,
.bdl-catfish-item ins,
.bdl-catfish-item ins a,
.bdl-catfish-item img {
    width: 100%;
    height: 65px;
    display: block;
}

.bdl-catfish-item img {
    object-fit: contain;
}

.bdl-catfish-row--single .bdl-catfish-item {
    max-width: 730px;
    width: 100%;
}

.bdl-catfish-pc--singlekey {
    align-items: flex-start;
    justify-content: flex-start;
    gap: 12px;
}

.bdl-catfish-item--singlekey {
    width: 588px;
    max-width: 588px;
    height: 73px;
}

.bdl-catfish-item--singlekey .bdl-slot,
.bdl-catfish-item--singlekey ins,
.bdl-catfish-item--singlekey ins a,
.bdl-catfish-item--singlekey img {
    width: 588px;
    max-width: 588px;
    height: 73px;
    display: block;
}

.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: 0;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 1080px;
        height: 75px;
        margin: auto;
        gap: 12px;
        z-index: 999998;

        .bdl-slot, ins, ins a {
            display: block;
        }
    }
    
    .bdl-catfish-mb, #bdl_mobile_top_slot {
        display: none !important;
    }

    .bdl-catfish-pc.bdl-catfish-pc--singlekey {
        max-width: 1200px;
        height: 83px;
    }
}

@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;
        }
    }
}