@charset "utf-8";
/*----------------------------------------------------------------------
 * SP追従CVバー（案A: 円形フロート中央）
 * プレフィックス: sp-floating-cv
 * 仕様:
 *   - 左: LINE (公式緑 #06C755)
 *   - 中央: 予約する (IDATEN公式グラデの円・上方向にフロート)
 *   - 右: 電話診療とは (ブランド紺 #0F2D70)
 *----------------------------------------------------------------------*/

/* デフォルト非表示（PCでは完全非表示） */
.sp-floating-cv {
    display: none;
}

@media screen and (max-width: 767px) {

    .sp-floating-cv {
        display: flex;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 9999;
        align-items: stretch;
        background: #ffffff;
        height: 56px;
        padding-bottom: env(safe-area-inset-bottom, 0);
        box-shadow: 0 -4px 14px rgba(15, 45, 112, 0.10);
        opacity: 0;
        transform: translateY(100%);
        pointer-events: none;
        transition: opacity 0.25s ease, transform 0.25s ease;
        will-change: opacity, transform;
        overflow: visible; /* 中央円が上にはみ出すため */
    }

    /* 出現状態 */
    .sp-floating-cv.is-visible {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* フッター接触時の格納状態 */
    .sp-floating-cv.is-hidden {
        opacity: 0;
        transform: translateY(100%);
        pointer-events: none;
    }

    /* 共通リセット */
    .sp-floating-cv__item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        -webkit-tap-highlight-color: transparent;
        transition: opacity 0.15s ease;
        box-shadow: none;
        border-radius: 0;
        letter-spacing: normal;
    }

    /* 既存 .more_button 系 :hover { transform: scale(1.03) } を打ち消し */
    .sp-floating-cv__item:hover,
    .sp-floating-cv__item:focus {
        transform: none;
        box-shadow: none;
    }
    .sp-floating-cv__item:active { opacity: 0.85; }

    /* LINE / 電話診療とは（左右の通常ボタン） */
    .sp-floating-cv__item--line,
    .sp-floating-cv__item--tel {
        flex: 1;
        gap: 3px;
        padding: 6px 4px 8px;
        font-size: 11px;
        font-weight: 700;
        line-height: 1.2;
        color: #0F2D70;
        background: #ffffff;
    }
    /* 電話ボタン: ラベル1個 + 背景?マーク。LINE と対称な padding/gap */
    .sp-floating-cv__item--tel {
        position: relative;
        overflow: hidden; /* ?が外にはみ出ないように */
        gap: 0;
        padding: 6px 4px;
    }

    /* 背景の?マーク: 中央配置・36×36 (LINE のサイズ感に揃える) */
    .sp-floating-cv__bg-qmark {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: 36px;
        height: 36px;
        opacity: 0.15;
        color: #0F2D70; /* SVG fill="currentColor" を継承 */
        pointer-events: none;
        z-index: 0;
        line-height: 0; /* SVG 周辺の余白除去 */
    }
    .sp-floating-cv__bg-qmark svg {
        display: block;
        width: 100%;
        height: 100%;
    }

    /* 電話ラベルを ? より前面に */
    .sp-floating-cv__item--tel .sp-floating-cv__label {
        position: relative;
        z-index: 1;
    }

    /* LINE: ラベルなしで PNG ブランドアイコンを縦中央配置 */
    .sp-floating-cv__item--line {
        gap: 0;
        padding: 6px 4px;
    }
    .sp-floating-cv__line-img {
        display: block;
        width: 36px;
        height: 36px;
        flex-shrink: 0;
    }

    .sp-floating-cv__label { display: block; }

    /* 中央: 予約する 円形フロート */
    .sp-floating-cv__item--web {
        flex: 0 0 110px;
        position: relative;
        margin: 0 4px;
        background: transparent;
        /* 円要素を絶対配置で扱うため、a 要素自体は中身なしのフレーム枠として機能 */
    }
    .sp-floating-cv__circle {
        position: absolute;
        /* 円を大きく + さらに下げる（上に出る量は 22px 程度、下も sp-cv バー内に沈む） */
        top: -22px;
        left: 50%;
        transform: translateX(-50%);
        box-sizing: border-box; /* padding で楕円化しないよう外形を固定 */
        width: 96px;
        height: 96px;
        border-radius: 50%;
        background: linear-gradient(135deg, #003973 0%, #578D8D 100%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 16px 0 26px; /* アイコン+文字を見える領域の中央寄りに（少し下げる） */
        color: #ffffff;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: 0.02em;
        box-shadow: 0 4px 12px rgba(0, 57, 115, 0.32), 0 0 0 4px rgba(255, 255, 255, 0.95);
        z-index: 50;
        transition: box-shadow 0.15s ease;
    }
    .sp-floating-cv__circle .sp-floating-cv__icon {
        display: block;
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        color: #ffffff;
    }
    .sp-floating-cv__circle-label {
        display: block;
        font-size: 11.5px;
        font-weight: 700;
        line-height: 1.1;
    }
    .sp-floating-cv__item--web:hover .sp-floating-cv__circle,
    .sp-floating-cv__item--web:focus .sp-floating-cv__circle {
        box-shadow: 0 6px 16px rgba(0, 57, 115, 0.38), 0 0 0 4px rgba(255, 255, 255, 0.95);
    }
    .sp-floating-cv__item--web:active .sp-floating-cv__circle {
        opacity: 0.92;
    }

    /* フォーカスリング */
    .sp-floating-cv__item:focus-visible {
        outline: 2px solid #0F2D70;
        outline-offset: -2px;
    }

    /* SP表示時は、本文が最下部まで追従バーに隠れないよう padding を確保 */
    body.has-sp-floating-cv {
        padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
    }

    /* 動きに敏感なユーザー向けのアニメーション抑制 */
    @media (prefers-reduced-motion: reduce) {
        .sp-floating-cv,
        .sp-floating-cv__circle {
            transition: none;
        }
    }
}
