@charset "UTF-8";
/* ==========================================================================
   2026-11-14 追従バナー（template/banner-fixed.php）
   .banner-fixed   : PC右下の縦長バナー（TOP・広告用TOP・制作ジャンル）。999px以下は非表示
   .banner-fixedSp : 制作ジャンル・TOPの1344px以下（SP・TAB）で下固定CTAの代わりに出す横長バナー（白帯はSPのみ）
   バナー表示中は「上に戻る」ボタン（.l-pagetop）を非表示
   制作ジャンルの1345px以上は右下の縦長バナーを出し、閉じるまで下固定CTA（.bar-bottom-fixed）を非表示
   ========================================================================== */

/* ---------- PC 縦長バナー ---------- */
.banner-fixed {
    position: fixed;
    right: 8px;
    bottom: 8px;
    z-index: 9999;
    width: 210px;
    transition: opacity 0.3s, visibility 0.3s;
}

.banner-fixed[style*="opacity: 0"] {
    pointer-events: none;
}

.banner-fixed.is-closed {
    display: none !important;
}

.banner-fixed__link {
    display: block;
}

.banner-fixed__link img {
    display: block;
    width: 100%;
    height: auto;
}

.banner-fixed__close {
    position: relative;
    display: block;
    width: 16px;
    height: 16px;
    margin: 0 0 5px auto;
    padding: 0;
    cursor: pointer;
    background: none;
    border: none;
}

.banner-fixed__close::before,
.banner-fixed__close::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 21px;
    height: 3px;
    content: "";
    background: #bbb;
    transition: background-color 0.3s;
}

.banner-fixed__close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.banner-fixed__close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

@media (width >= 1000px) {
    .banner-fixed__link:hover {
        opacity: 0.8;
    }

    .banner-fixed__close:hover::before,
    .banner-fixed__close:hover::after {
        background: #c8000f;
    }

    /* 広告用TOP：バナー表示中は「上に戻る」を出さない（TOP は 1345px以上のみ・下に記載） */
    body:has(.banner-fixed:not(._case):not(._top):not(.is-closed):not([style*="opacity: 0"])) .l-pagetop {
        display: none;
    }
}

@media (width < 1000px) {
    .banner-fixed {
        display: none;
    }
}

/* TOP：2026-11-25 制作ジャンルと同じく 1345px以上は右下の縦長バナー、1344px以下は下の横長バナー（.banner-fixedSp） */
@media (width >= 1345px) {
    body:has(.banner-fixed._top:not(.is-closed):not([style*="opacity: 0"])) .l-pagetop {
        display: none;
    }
}

@media (width < 1345px) {
    .banner-fixed._top {
        display: none;
    }
}

/* 制作ジャンル：1345px以上は右下の縦長バナー（Figma どおり幅210px）、1344px以下は下の横長バナー（.banner-fixedSp）
   1430px以下は本文（幅960px・中央）の右余白に収まるよう縮小＝文章にかぶらない（右6px＋本文との間10px）
   ※ position:fixed の % は画面幅（スクロールバー除く） */
.banner-fixed._case {
    z-index: 10000;
    right: 6px;
    width: min(210px, calc((100% - 960px) / 2 - 16px));
    visibility: hidden;
    opacity: 0;
}

.banner-fixed._case.is-show {
    visibility: visible;
    opacity: 1;
}

@media (width < 1345px) {
    .banner-fixed._case {
        display: none;
    }
}

@media (width >= 1345px) {
    body:has(.banner-fixed._case:not(.is-closed)) .l-pagetop,
    body:has(.banner-fixed._case:not(.is-closed)) .bar-bottom-fixed {
        display: none !important;
    }
}

/* ---------- SP・TAB 横長バナー（制作ジャンル・1344px以下） ---------- */
.banner-fixedSp {
    display: none;
}

@media (width < 1345px) {
    body:has(.banner-fixedSp) .bar-bottom-fixed {
        display: none !important;
    }

    /* 2026-11-25 下固定バーがないので「上に戻る」は TOP と同じ位置（下24px）に
       ※ template/bar-bottom-fixed.php が .l-pagetop { bottom: 90px !important } を出すので !important で上書き */
    body:has(.banner-fixedSp) .l-pagetop {
        bottom: 24px !important;
    }

    .banner-fixedSp {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 9999;
        display: block;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.3s, visibility 0.3s;
    }

    .banner-fixedSp.is-show {
        visibility: visible;
        opacity: 1;
    }

    .banner-fixedSp__link {
        position: relative;
        display: block;
        padding: 21px 0 calc(14px + env(safe-area-inset-bottom));
        text-decoration: none;
    }

    .banner-fixedSp__btn {
        display: flex;
        gap: 5.5px;
        align-items: center;
        width: 322px;
        max-width: calc(100% - 20px);
        margin: 0 auto;
        padding: 7px 17px 8px 30px;
        font-size: 15.6px;
        font-weight: bold;
        line-height: 1.45;
        color: #fff;
        letter-spacing: 0.04em;
        white-space: nowrap;
        background: #c8000f;
        border: 1.8px solid #fff;
        border-radius: 5.5px;
        filter: drop-shadow(0 3.7px 3.2px rgba(0, 0, 0, 0.15));
    }

    .banner-fixedSp__btn ._big {
        font-size: 17.5px;
    }

    .banner-fixedSp__btn::after {
        flex-shrink: 0;
        width: 22px;
        height: 22px;
        content: "";
        background: url(../img/common/floating_btn_sp_arrow.svg) no-repeat center / contain;
    }

    /* 吹き出し（ボタン左端から23px・上に重ねる） */
    .banner-fixedSp__bubble {
        position: absolute;
        top: 0;
        left: calc(50% - 161px + 23px);
        z-index: 1;
        width: 232.5px;
        height: 28.5px;
        font-size: 10.1px;
        font-weight: 500;
        line-height: 20.2px;
        color: #222;
        text-align: center;
        letter-spacing: -0.48px;
        white-space: nowrap;
    }

    .banner-fixedSp__bubble::before {
        position: absolute;
        top: -2.76px;
        right: -4.6px;
        bottom: -9.2px;
        left: -4.6px;
        z-index: -1;
        content: "";
        background: url(../img/common/floating_btn_sp_bubble.svg) no-repeat center / 100% 100%;
    }

    .banner-fixedSp__bubble ._red {
        font-size: 11.95px;
        font-weight: bold;
        color: #c8000f;
    }

    .banner-fixedSp__bubble ._and {
        font-size: 10.1px;
    }

    /* 資料画像（ボタン左端から250px・上に重ねる）。Figma同様に見積書＋構成案3枚を傾けて重ねる（背景透明） */
    .banner-fixedSp__material {
        position: absolute;
        top: 10.7px;
        left: calc(50% - 161px + 250.6px);
        width: 65px;
        height: 57.5px;
    }

    .banner-fixedSp__material img {
        position: absolute;
        display: block;
        max-width: none;
        border: 0.4px solid #ccc;
    }

    .banner-fixedSp__material ._estimate {
        top: 2.88px;
        left: 1.8px;
        width: 44.36px;
        height: 44.33px;
        box-shadow: 1.84px 1.77px 2.86px rgba(0, 0, 0, 0.15);
        transform: rotate(-4.87deg);
    }

    .banner-fixedSp__material ._plan {
        width: 34.84px;
        height: 49.29px;
        box-shadow: 0.78px 0.78px 1.56px rgba(0, 0, 0, 0.1);
    }

    .banner-fixedSp__material ._p3 {
        top: 3.46px;
        left: 26.29px;
        transform: rotate(8.52deg);
    }

    .banner-fixedSp__material ._p4 {
        top: 2.58px;
        left: 24.49px;
        transform: rotate(7.51deg);
    }

    .banner-fixedSp__material ._p2 {
        top: 1.71px;
        left: 22.69px;
        transform: rotate(6.11deg);
    }
}

/* 2026-11-25 横長バナーの白帯はスマホ（767px以下）だけ。TAB以上は白帯なし（視野が狭くなるため）
   白帯がない幅ではボタン・吹き出し・資料画像以外の透明部分は下のページをクリックできるように */
@media (width < 768px) {
    .banner-fixedSp__link {
        /* 上12pxは吹き出しのはみ出し分（透明）、その下が白帯 */
        background: linear-gradient(to bottom, transparent 12px, #fff 12px);
    }
}

@media (768px <= width < 1345px) {
    .banner-fixedSp,
    .banner-fixedSp__link {
        pointer-events: none;
    }

    .banner-fixedSp__link > span {
        pointer-events: auto;
    }
}
