/* ============================================================
   受講料シミュレーター CSS
   新LPのスタイルシートに追記してください
   ============================================================ */
.price-modal {
  position: fixed;
  inset: 0;
  display: none;
  /* ヘッダーナビ（lp.css側）より確実に前面に出す（最大値＋!importantで上書きを防ぐ） */
  z-index: 2147483647 !important;
}

.price-modal.is-open {
  display: block;
}

/* モーダル表示中は背景のスクロールを止める（simulator.js が body に付与） */
body.is-modal-open {
  overflow: hidden;
}

.price-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.price-modal__content {
  position: relative;
  width: min(92vw, 420px);
  max-height: 90vh;
  margin: 5vh auto 0;
  background: #fff;
  border-radius: 14px;
  padding: 16px 14px 120px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  overflow: auto;
}

/* close */
.price-modal__close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f3f4f6;
  color: #111;
  font-size: 18px;
  cursor: pointer;
}

/* =============================
   見出し
============================= */
.pm-head {
  text-align: center;
  padding-top: 8px;
  margin-bottom: 12px;
}

.pm-title {
  font-weight: 900;
  font-size: 18px;
  margin-bottom: 6px;
  letter-spacing: .04em;
}

.pm-sub {
  font-size: 12px;
  line-height: 1.55;
  color: #444;
}

/* =============================
   ブロック
============================= */
.pm-block {
  margin-top: 14px;
}

.pm-q {
  font-weight: 800;
  font-size: 13px;
  margin-bottom: 8px;
  color: #111;
}

.pm-note {
  font-size: 11px;
  line-height: 1.55;
  color: #666;
  margin: -2px 0 10px;
}

.pm-footnote {
  text-align: center;
  font-size: 11px;
  line-height: 1.6;
  color: #777;
  margin-top: 16px;
  margin-bottom: 0;
}

/* =============================
   ボタングリッド
============================= */
.pm-btn-grid {
  display: grid;
  gap: 10px;
}

.pm-btn-grid.is-2 {
  grid-template-columns: 1fr 1fr;
}

.pm-btn-grid.is-1 {
  grid-template-columns: 1fr;
}

/* =============================
   ボタン（画像の青枠）
============================= */
/* 選択色を完全に指定 */
.pm-btn {
  border: 2px solid #2B3EC1;
  background: #fff;
  color: #2B3EC1;
  border-radius: 10px;
  padding: 11px 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
}

.pm-btn.is-active {
  background: #2B3EC1;
  border-color: #2B3EC1;
  color: #fff;
}

.pm-btn:hover {
  filter: brightness(0.98);
}


/* =============================
   下部固定（画像のブルーバー）
============================= */
.pm-sticky {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 140px;
  align-items: stretch;
  gap: 10px;
  padding: 12px 12px 12px;
  background: #1b2ea6;
  border-radius: 0 0 14px 14px;
}

.pm-price {
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
}

.pm-price__row {
  display: flex;
  justify-content: space-between;
  opacity: .92;
  margin-bottom: 4px;
}

.pm-price__main {
  margin-top: 6px;
  font-weight: 900;
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

.pm-price__main strong {
  font-size: 16px;
}

/* 申込みボタン（画像寄せ：クリーム色） */
.pm-submit {
  border: none;
  border-radius: 12px;
  background: #FFFED1;
  color: #2B3EC1;       /* 文字色を青にすると映える */
  font-weight: 900;
  font-size: 15px;
  cursor: pointer;
  height: 100%;
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
}

.pm-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}


/* スクロールバー綺麗に */
.price-modal__content::-webkit-scrollbar {
  width: 6px;
}
.price-modal__content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,.2);
  border-radius: 999px;
}


/* -------------------------
   割引部分（適用なしを左下に）
------------------------- */
.pm-btn-grid--discount {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* 適用なしだけ左下へ */
/* .pm-btn-grid--discount .pm-btn--none {
  grid-column: 1 / 2;
} */


.smart-daikou {
	color: #2B3EC1;
	font-weight: bold;
	font-size: 16px;
	text-align: center;
	display: block;
}

.form-under {
	font-size: 10px;
}




@media screen and (min-width: 641px) {

  /* ✅ モーダルコンテンツの高さを確定（ここが重要） */
  #priceModal .price-modal__content {
    max-height: 92vh;
    height: 92vh;
    overflow: hidden;
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
  }

  /* ✅ formもflexにしてスクロール領域を成立させる */
  #priceModal .price-form--modal {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* ✅ この中だけスクロールする */
  #priceModal .pm-scroll--modal {
    flex: 1;
    min-height: 0;                 /* ←これ無いとPCでスクロール効かないこと多い */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 16px 14px 24px;

    /* ✅ 下部固定バーに隠れないよう余白 */
    padding-bottom: 190px;
  }

  /* ✅ 下部固定バー（常に表示） */
  #priceModal .pm-sticky--modal {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
  }
}




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

  /* ✅ モーダル本体を画面内に固定（重要） */
  .price-modal__content {
    width: calc(100vw - 20px);
    margin: 10px auto;

    height: calc(95dvh - 20px); /* iPhone Safari対応 */
    height: calc(95vh - 20px);
    max-height: calc(95dvh - 20px);
    max-height: calc(95vh - 20px);

    overflow: hidden;     /* ✅ スクロールは中に任せる */
    padding: 0;
    position: relative;

	z-index: 2;
  }

  /* ✅ フォームを縦構造に */
  #priceModal .price-form {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  /* ✅ スクロール領域（ここが動く） */
  #priceModal .pm-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 16px 14px;
    padding-bottom: 160px; /* ✅ 下部固定バーに隠れない分 */

	position: relative;
    z-index: 1;
  }

  /* ✅ 下部固定バー */
  #priceModal .pm-sticky {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
	z-index: 900;
  }

  /* ✅ iPhoneのタップしやすさ */
  #priceModal .pm-btn {
    padding: 12px 10px;
  }

  /* ✅ closeボタン押しやすく */
  .price-modal__close {
    top: 8px;
    right: 8px;
	z-index: 9999; 
    pointer-events: auto;
  }
}



.sec17 .price-tabs {
	margin-top: 50px;
}

@media screen and (max-width: 640px) {
	.sec17 .price-tabs {
		margin-top: 8%;
	}
}

.webp .sec17 {
	background: url(../images/webp/sec4_bg.webp);
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center top;
}

.no-webp .sec17 {
	background: url(../images/sec4_bg.jpg);
	background-size: cover;
	background-repeat: no-repeat;
	background-position: center top;
}








/* 押せない状態 */
#priceModal .price-submit.is-disabled{
  background:#bdbdbd !important;
  border-color:#bdbdbd !important;
  color:#fff !important;
  cursor:not-allowed !important;
  opacity:1 !important;
  pointer-events:auto; /* hoverが効くため */
  position:relative;
}

/* 押せないhover */
#priceModal .price-submit.is-disabled:hover{
  filter:brightness(0.95);
}

/* ツールチップ */
#priceModal .price-submit.is-disabled:hover::after{
  content:attr(data-disabled-text);
  position:absolute;
  left:45%;
  bottom:calc(100% + 10px);
  transform:translateX(-50%);
  white-space:nowrap;
  font-size:12px;
  /* padding:8px 10px; */
  padding:0;
  border-radius:8px;
  background:rgba(0,0,0,0.85);
  color:#fff;
  z-index:9999;
}

/* 三角 */
#priceModal .price-submit.is-disabled:hover::before{
  content:"";
  position:absolute;
  left:45%;
  bottom:calc(100% + 2px);
  transform:translateX(-50%);
  /* border:6px solid transparent; */
  border:0;
  border-top-color:rgba(0,0,0,0.85);
  z-index:9999;
}





#priceModal .price-submit.is-disabled {
  background: #bdbdbd !important;
  color: rgba(255,255,255,0.85) !important;
  border-color: transparent !important;
  cursor: not-allowed !important;
  opacity: 0.85;
}

#priceModal .price-submit.is-disabled:hover {
  filter: grayscale(1);
  opacity: 1;
  transform: none;
}
