/* ==========================================================================
   料金シミュレーション セクション
   ========================================================================== */

/* 全体背景：浮きすぎず、前後と区別のつくダークブルーグレーコンテナ */
.wimax-simulation-section {
  position: relative;
  /* background-color: rgba(14, 18, 25, 0.85); */
  background-image: url(../img/simulation_bg.png);
  background-size:auto 100%;
  background-position: center center;
  background-repeat: no-repeat;

  /* border-top: 1px solid rgba(255, 107, 0, 0.25);
  border-bottom: 1px solid rgba(255, 107, 0, 0.25); */
  padding: 40px 0;
}

@media (min-width: 768px) {
  .wimax-simulation-section {
    padding: 80px 0;
  }
}

.simulation-section-title {
  text-align: center;
  font-size: 24px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 32px;
}

.simulation-title-sub {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 2px;
  margin-bottom: 4px;
}

@media (min-width: 768px) {
  .simulation-section-title {
    font-size: 40px;
    margin-bottom: 48px;
  }
}

/* シミュレーター外枠 */
.sim-wrapper {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

/* 各階層（レイヤー） */
.sim-layer {
  position: relative;
}

.sim-layer-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.sim-step-num {
  background: var(--color-primary);
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 4px;
}

.title-sub-txt {
  font-size: 12px;
  color: var(--color-text-sub);
  font-weight: normal;
}

/* ==========================================================================
   警告アラートメッセージ
   - 2つの警告を同じグリッド領域に重ね、常に最大メッセージ分の高さを確保
   - display:none を使わず opacity / visibility だけで切り替えることで、
     セクション高の変化 → 背景画像の再スケールを防止する
   ========================================================================== */
.sim-alert-stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 12px;
}

.sim-alert-msg {
  grid-area: 1 / 1;
  align-self: start;
  min-width: 0;
  margin: 0;
  font-size: 12px;
  line-height: 1.55;
  color: #ff4500;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  pointer-events: none;
  transition:
    opacity 0.24s ease,
    transform 0.24s ease,
    visibility 0s linear 0.24s;
}

.sim-alert-msg.is-show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition:
    opacity 0.28s ease,
    transform 0.28s ease,
    visibility 0s linear 0s;
}

@media (prefers-reduced-motion: reduce) {
  .sim-alert-msg,
  .sim-alert-msg.is-show {
    transform: none;
    transition: none;
  }
}

/* グリッド配置 */
.sim-card-grid {
  display: grid;
  gap: 12px;
}

.sim-plan-grid {
  grid-template-columns: repeat(1, 1fr);
}

.sim-opt-grid {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 580px) {
  .sim-plan-grid { grid-template-columns: repeat(2, 1fr); }
  .sim-opt-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 850px) {
  .sim-opt-grid { grid-template-columns: repeat(3, 1fr); }
}

/* --- カード型ボタン（押し込みギミック付き） --- */
.sim-card {
  position: relative;
  background: rgba(28, 30, 40, 0.9);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 16px 16px 16px 42px; /* 左側にチェックマーク用の余白 */
  cursor: pointer;
  user-select: none;
  /* 立体ギミック用シャドウと押し込み設定 */
  box-shadow: 0 4px 0px rgba(0, 0, 0, 0.6), 0 5px 15px rgba(0,0,0,0.4);
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.sim-card:hover {
  border-color: rgba(255, 107, 0, 0.5);
  transform: translateY(-2px);
}

/* STEP 1未選択時：オプションは操作不可であることを明示 */
.sim-card.js-sim-opt.is-disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: saturate(0.45) grayscale(0.18);
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.28);
  transform: none;
}

.sim-card.js-sim-opt.is-disabled:hover,
.sim-card.js-sim-opt.is-disabled:active {
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.45), 0 4px 12px rgba(0, 0, 0, 0.28);
  transform: none;
}

.sim-card.js-sim-opt.is-disabled .sim-card-check {
  border-color: rgba(255, 255, 255, 0.16);
  background: transparent;
}

.sim-card.js-sim-opt.is-disabled .sim-card-name,
.sim-card.js-sim-opt.is-disabled .sim-card-price,
.sim-card.js-sim-opt.is-disabled .sim-card-price .unit {
  color: rgba(255, 255, 255, 0.48);
}

/* 押し込み状態（クリック時） */
.sim-card:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0px rgba(0, 0, 0, 0.6);
}

/* 選択済み状態（.is-selected）目立つスタイル */
.sim-card.is-selected {
  background: linear-gradient(135deg, rgba(45, 35, 30, 0.95) 0%, rgba(28, 30, 40, 0.95) 100%);
  border-color: var(--color-primary);
  box-shadow: 0 0 15px rgba(255, 107, 0, 0.4), inset 0 0 10px rgba(255, 107, 0, 0.2);
  transform: translateY(2px); /* 押し込まれた状態を維持 */
}

/* チェックマークアイコン */
.sim-card-check {
  position: absolute;
  top: 50%;
  left: 14px;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transition: all 0.2s ease;
}

.sim-card.is-selected .sim-card-check {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.sim-card.is-selected .sim-card-check::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 6px;
  width: 4px;
  height: 8px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* カードテキスト */
.sim-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.sim-card-price {
  font-size: 16px;
  font-weight: 900;
  color: var(--color-primary);
  font-family: 'Arial Black', sans-serif;
}

.sim-card-price .unit {
  font-size: 11px;
  color: #c0c0c0;
  font-weight: normal;
  font-family: sans-serif;
  margin-left: 2px;
}

/* --- 第三レイヤー：結果表示ボックス ---
   選択カードと明確に差別化する、サイバーHUD風の結果パネル */
.sim-result-layer {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* 本体背景 + ボーダーグラデーション。
     右側は薄い水色、左へ向かうほど深いブルーへ自然につなぐ */
  background:
    linear-gradient(135deg, rgba(0, 126, 255, 0.12) 0%, transparent 34%) padding-box,
    linear-gradient(315deg, rgba(255, 107, 0, 0.10) 0%, transparent 31%) padding-box,
    linear-gradient(180deg, rgba(19, 27, 42, 0.98) 0%, rgba(8, 12, 22, 0.99) 100%) padding-box,
    linear-gradient(to left, rgba(141, 225, 255, 0.92) 0%, rgba(52, 181, 255, 0.92) 42%, rgba(0, 119, 255, 0.96) 100%) border-box;
  border: 1px solid transparent;
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    inset 0 0 42px rgba(0, 121, 255, 0.10),
    0 12px 32px rgba(0, 0, 0, 0.82),
    0 0 28px rgba(0, 153, 255, 0.22);
}

/* 背景意匠：サイバーHUDベースに、うっすらと面発光・走査線・情報ラインを重ねる */
.sim-result-layer::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  opacity: 0.92;
  background:
    radial-gradient(circle at 8% 10%, rgba(92, 206, 255, 0.18), transparent 18%),
    radial-gradient(circle at 92% 12%, rgba(92, 206, 255, 0.15), transparent 16%),
    radial-gradient(circle at 86% 86%, rgba(92, 206, 255, 0.10), transparent 18%),
    linear-gradient(90deg, rgba(80, 180, 255, 0.10) 0%, transparent 18%, transparent 82%, rgba(80, 180, 255, 0.06) 100%),
    repeating-linear-gradient(180deg,
      transparent 0 28px,
      rgba(67, 186, 255, 0.055) 28px 29px,
      transparent 29px 58px),
    repeating-linear-gradient(180deg,
      transparent 0 7px,
      rgba(255, 255, 255, 0.015) 7px 8px,
      transparent 8px 16px),
    linear-gradient(180deg, rgba(255,255,255,0.028) 0%, rgba(255,255,255,0.00) 100%);
  background-repeat: no-repeat;
  background-size: auto, auto, auto, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
}

/* HUDコーナーと左右の点線装飾 */
.sim-result-layer::after {
  content: '';
  position: absolute;
  inset: 10px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.92;
  border-radius: 12px;
  background:
    linear-gradient(90deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) left top / 48px 2px no-repeat,
    linear-gradient(180deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) left top / 2px 22px no-repeat,
    linear-gradient(90deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) right top / 48px 2px no-repeat,
    linear-gradient(180deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) right top / 2px 22px no-repeat,
    linear-gradient(90deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) left bottom / 48px 2px no-repeat,
    linear-gradient(180deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) left bottom / 2px 22px no-repeat,
    linear-gradient(90deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) right bottom / 48px 2px no-repeat,
    linear-gradient(180deg, rgba(86, 208, 255, 0.62), rgba(86, 208, 255, 0.62)) right bottom / 2px 22px no-repeat,
    repeating-linear-gradient(90deg,
      rgba(76, 198, 255, 0.18) 0 8px,
      transparent 8px 14px) left 18px top 18px / 92px 2px no-repeat,
    repeating-linear-gradient(90deg,
      rgba(76, 198, 255, 0.16) 0 7px,
      transparent 7px 13px) left 18px bottom 18px / 70px 2px no-repeat,
    repeating-linear-gradient(90deg,
      rgba(76, 198, 255, 0.18) 0 8px,
      transparent 8px 14px) right 18px top 18px / 92px 2px no-repeat,
    repeating-linear-gradient(90deg,
      rgba(76, 198, 255, 0.16) 0 7px,
      transparent 7px 13px) right 18px bottom 18px / 70px 2px no-repeat;
}

.sim-result-inner {
  position: relative;
  z-index: 1;
}

.sim-result-label {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
}

.sim-result-price-wrap {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin-bottom: 20px;
  line-height: 1;
}

.sim-result-symbol {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-right: 6px;
}

.sim-result-price {
  font-size: 52px;
  font-weight: 900;
  color: var(--color-primary);
  font-family: 'Arial Black', sans-serif;
  letter-spacing: -1px;
  text-shadow: 0 0 15px rgba(255, 107, 0, 0.5);
  margin: 0 2px;
}

.sim-result-unit {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.sim-result-note{
  color:rgba(255,255,255,0.7);
  font-size:12px;
  padding:10px 0 0;
}

@media (min-width: 768px) {
  .sim-result-price { font-size: 68px; }
  .sim-result-unit { font-size: 24px; }
}

.sim-result-btn {
  position: relative;
  max-width: 320px;
  margin: 0 auto;
  overflow: hidden;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.28) !important;
  background: linear-gradient(135deg, #00c8ff 0%, #008cff 48%, #0068ee 100%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.38),
    inset 0 -2px 0 rgba(0, 49, 139, 0.34),
    0 7px 16px rgba(0, 0, 0, 0.42),
    0 0 18px rgba(0, 166, 255, 0.48) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.sim-result-btn::before {
  content: '';
  position: absolute;
  inset: 1px 2px auto;
  height: 42%;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.27), transparent);
  pointer-events: none;
}

.sim-result-btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.46),
    inset 0 -2px 0 rgba(0, 49, 139, 0.24),
    0 9px 20px rgba(0, 0, 0, 0.46),
    0 0 26px rgba(0, 198, 255, 0.68) !important;
}
/* ========================================================================== 
   スマートフォン：縦方向をコンパクト化
   フォントサイズは既存値を維持し、配置と余白のみ調整する
   ========================================================================== */
@media (max-width: 767px) {
  .wimax-simulation-section {
    padding: 28px 0;
  }

  .simulation-section-title {
    margin-bottom: 18px;
  }

  .simulation-title-sub {
    margin-bottom: 2px;
  }

  .sim-wrapper {
    gap: 18px;
  }

  .sim-layer-title {
    margin-bottom: 8px;
    gap: 8px;
  }

  .sim-alert-msg {
    margin-bottom: 7px;
    line-height: 1.35;
  }

  /* STEP 1：2プランを必ず横並びにして高さを圧縮 */
  .sim-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  /* STEP 2：オプションは2列グリッド。横スクロールさせず全項目を一覧表示 */
  .sim-opt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
    margin: 0;
  }

  .sim-opt-grid .sim-card {
    min-width: 0;
    width: 100%;
  }

  /* カード自体の上下余白を詰める。文字サイズは変更しない */
  .sim-card {
    min-height: 62px;
    padding: 10px 9px 10px 35px;
    border-radius: 10px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.34);
  }

  .sim-card-check {
    left: 10px;
  }

  .sim-card-name {
    margin-bottom: 2px;
    line-height: 1.3;
  }

  /* 結果エリア：ラベルと料金を同じ段に置き、CTAを直下へ */
  .sim-result-layer {
    padding: 13px 12px 12px;
    border-radius: 12px;
  }

  .sim-result-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px 10px;
  }

  .sim-result-label {
    flex: 0 1 92px;
    margin: 0;
    line-height: 1.35;
    text-align: left;
  }

  .sim-result-price-wrap {
    flex: 0 1 auto;
    margin: 0;
    white-space: nowrap;
  }

  .sim-result-symbol {
    margin-right: 4px;
  }

  .sim-result-price {
    margin: 0 1px;
  }

  .sim-result-btn {
    flex: 1 0 100%;
    max-width: none;
    margin: 0;
    padding-top: 11px;
    padding-bottom: 11px;
  }
}
