@charset "UTF-8";

/* =========================================
   モーダルウィンドウの基本スタイル
   ========================================= */

/* 1. モーダルの枠組み */
dialog {
    padding: 0;
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-width: 680px;
    width: 95%;

    /* モーダルを画面の真ん中に固定 */
    margin: auto;
    inset: 0;

    /* 高さの初期設定 */
    height: auto;
    max-height: 95vh;
    /* PCでは画面の95%まで許容 */

    overflow: hidden;
    position: fixed;
    background: #fff;

    /* アニメーション用（お好みで） */
    opacity: 0;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out;
    transform: scale(0.95);
}

/* 表示時のスタイル */
dialog[open] {
    opacity: 1;
    transform: scale(1);
}

/* 2. 背景（バックドロップ） */
dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

/* 3. iframeの設定 */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* =========================================
   パーツのデザイン
   ========================================= */

/* 閉じるボタン（右上の×） */
.close-icon-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #ddd;
    font-size: 24px;
    color: #555;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s, color 0.2s;
}

.close-icon-btn:hover {
    background-color: #f0f0f0;
    color: #333;
}

/* トリガーボタン（モーダルを開くボタン） */
.trigger-btn {
    background-color: #333;
    color: #fff;
    padding: 15px 30px;
    font-size: 16px;
    border: none;
    cursor: pointer;
    border-radius: 4px;
    transition: opacity 0.2s;
}

.trigger-btn:hover {
    opacity: 0.8;
}

/* ------------------- 中芯交換専用 追従バナー (nakashin-cta-bar) -------------------- */
.f-fixed.nakashin-cta-bar {
    position: fixed;
    z-index: 100;
    /* 他の要素より前面に */
    display: grid;
    transition: all 0.3s ease;
}

.f-fixed.nakashin-cta-bar .f-fixed_item {
    position: relative;
}

/* 閉じるボタン */
.f-fixed.nakashin-cta-bar button.hide {
    aspect-ratio: 1/1;
    background: url(/asset2024/images/product/nemmelier/hide.svg) no-repeat center center /contain;
    position: absolute;
    z-index: 10;
    border: none;
    padding: 0;
    cursor: pointer;
}

/* PC版の設定：右下固定 */
@media screen and (min-width: 768px) {
    .f-fixed.nakashin-cta-bar {
        right: 1%;
        bottom: 50px;
        /* 数値を小さくして下に配置 */
        width: clamp(50px, 11vw, 130px);
    }

    .f-fixed.nakashin-cta-bar button.hide {
        top: 6%;
        left: 4%;
        width: clamp(10px, 2.2vw, 26px);
    }

    .f-fixed.nakashin-cta-bar .sp-only-text {
        display: none;
        /* スマホ用テキストを隠す */
    }
}

/* スマホ版の設定：下部全幅のCTAボタン形式 */
@media screen and (max-width: 767px) {
    .f-fixed.nakashin-cta-bar {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        padding: 10px;
    }

    .f-fixed.nakashin-cta-bar .pc-only-img {
        display: none;
        /* PC用画像を隠す */
    }

    /* ボタン化のデザイン */
    .f-fixed.nakashin-cta-bar .banner-inner-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 56px;
        border-radius: 100px;
        /* CTAボタンと同じグラデーション */
        background: linear-gradient(to right, #0087c9 0%, #0087c9 50%, #29efac 100%);
        background-size: 200% 100%;
        background-position: right center;
        color: #fff !important;
        font-weight: bold;
        font-size: 16px;
        text-decoration: none;
        transition: 0.5s;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    /* タップ時の動き */
    .f-fixed.nakashin-cta-bar .banner-inner-btn:active {
        background-position: left center;
    }

    .f-fixed.nakashin-cta-bar .f-fixed_item {
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }

    /* スマホでの×ボタンの位置 */
    .f-fixed.nakashin-cta-bar button.hide {
        top: -8px;
        right: 0;
        left: auto;
        width: 28px;
        background-color: #fff;
        border-radius: 50%;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    }
}

/* ×ボタンクリック時のアニメーション用 */
.f-fixed.nakashin-cta-bar .f-fixed_item.close {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

/* pタグ（nakashin-btn-wrap）の余白リセット */
.nakashin-btn-wrap {
    margin: 0;
    padding: 0;
}

/* スマホ版でのボタンサイズ調整 */
@media screen and (max-width: 767px) {
    .f-fixed.nakashin-cta-bar .nakashin-btn-wrap {
        width: 100%;
        display: block;
    }
}

/* スマホ版でのフッターと追従バナーの重なり回避 */
@media screen and (max-width: 767px) {
    /* バナーが表示されている間、bodyまたはwrapperに付与するクラス */
    .has-bottom-banner #footer {
        padding-bottom: 80px; /* バナーの高さに合わせて調整 */
        transition: padding 0.3s ease;
    }
}