/* ポップアップの全体ラッパー (初期状態は非表示・透明) */
#bh-popup-wrapper {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
/* 表示時のクラス */
#bh-popup-wrapper.is-active {
    display: block;
    opacity: 1;
}

/* 閉じるボタン (PC/SP共通で右上に配置) */
.bh-popup-close {
    position: absolute;
    top: -15px;
    right: -15px;
    width: 32px;
    height: 32px;
    background-color: #333;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 24px;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    user-select: none;
}
.bh-popup-close:hover {
    background-color: #000;
}

/* 画像スタイル */
.bh-popup-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px; /* 必要に応じて調整 */
}

/* ==========================================
   SP用スタイル (横幅100%・背景半透明黒)
========================================== */
@media (max-width: 767px) {
    #bh-popup-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.75); /* 背景半透明の黒 */
        z-index: 99999;
    }
    .bh-popup-inner {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 85%; /* 画面幅に対して少し余白を持たせる */
        max-width: 500px;
    }
}

/* ==========================================
   PC用スタイル (幅640px固定・右下配置)
========================================== */
@media (min-width: 768px) {
    #bh-popup-wrapper {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 320px; /* 制作サイズに固定 */
        z-index: 99999;
        /* 背景の黒はなくし、バナー以外の場所はクリック・操作できるようにする */
        pointer-events: none; 
    }
    .bh-popup-inner {
        position: relative;
        width: 100%;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
        border-radius: 4px;
        pointer-events: auto; /* バナー部分はクリック可能に */
    }
}