@charset "UTF-8";

/* =========================================
   右下追従バナー（PC向け）
========================================= */
.floating-banner {
    position: fixed;
    right: 20px;
    bottom: 120px; /* プログレスバーを避ける位置 */
    z-index: 9999;
    line-height: 1;
    width: 200px; /* バナー全体の幅を固定 */

    /* 変更点: 影と角丸は親コンテナ全体に適用 */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 10px; /* 全体の角丸 */
    background: #fff; /* 背景を白に（念のため） */
}

/* バナー画像部分のリンク */
.floating-banner .banner-link {
    display: block;
}

/* バナー内の画像 */
.floating-banner img {
    display: block;
    width: 100%; /* 幅いっぱいにする */
    height: auto;
    /* 画像自体の角丸や影は解除 (親コンテナに任せる) */
    border-radius: 0;
    box-shadow: none;

    border-radius: 10px; 
    border-bottom-left-radius: 0; /* 下側はCTAとくっつけるため角丸を解除 */
    border-bottom-right-radius: 0;
}

/* CTAテキストエリアのスタイル */
.floating-banner .banner-cta-text {
    display: block;
    background-color: #f9f9f9;
    color: #333;
    text-align: center;
    padding: 10px 5px;
    font-size: 10px;
    font-weight: bold;
    text-decoration: none;
    border-top: 1px solid #eee;
    transition: background-color 0.2s;
    
    /* CTAエリアの下側だけ角丸にする */
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

/* ホバー時のアクション（任意） */
.floating-banner .banner-cta-text:hover {
    background-color: #f0f0f0; /* ホバーで少し色を変える */
}

.floating-banner .banner-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 26px;
    height: 26px;
    background: #333;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 100;
}

/* =========================================
   スマホ向け調整（画面幅768px以下）
========================================= */
@media screen and (max-width: 768px) {
    /* 1. バナー全体の配置と幅をスマホ用に調整 */
    .floating-banner {
        right: 10px;
        bottom: 70px; /* スマホのスクロールプログレスや下部バーを避ける位置 */
        width: calc(100vw - 80px); /* 画面幅いっぱいから左右の余白を引いたサイズ */
        max-width: 130px; /* 大きくなりすぎないよう最大幅を制限 */
    }

    /* 2. 画像やCTAの文字サイズをスマホに合わせて少しコンパクトにする */
    .floating-banner .banner-cta-text {
        padding: 5px 8px; /* 上下の余白を少し狭くする */
        font-size: 8px;     /* フォントサイズを少し小さくする */
    }

    /* 3. 閉じるボタンの位置調整（はみ出しを避けるため微調整） */
    .floating-banner .banner-close {
        top: -8px;
        right: -8px;
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}