/* =========================================================
   estimate.css — 見積もりシミュレーターページ専用スタイル
   ========================================================= */

/* ---------- セクション ---------- */
.est-section {
  background: var(--bg-2);
}

/* ---------- 2カラムレイアウト ---------- */
.est-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

/* =====================================================
   メインカラム
   ===================================================== */
.est-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- ステップカード ---------- */
.est-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 4vw, 40px);
  transition:
    opacity 0.3s,
    filter 0.3s;
}
.est-step--locked {
  opacity: 0.4;
  pointer-events: none;
  filter: grayscale(0.3);
}
.est-step__head {
  margin-bottom: 28px;
}
.est-step__num {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--brand-1);
  background: rgba(31, 108, 255, 0.08);
  border: 1px solid rgba(31, 108, 255, 0.2);
  padding: 3px 12px;
  border-radius: 40px;
  display: inline-block;
  margin-bottom: 12px;
}
.est-step__title {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
}
.est-step__lead {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

/* ---------- サービス選択グリッド ---------- */
.est-service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.est-service-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 14px;
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition:
    border-color 0.22s,
    background 0.22s,
    transform 0.22s,
    box-shadow 0.22s;
  text-align: center;
  position: relative;
  user-select: none;
}
.est-service-card:hover {
  border-color: var(--brand-1);
  background: rgba(31, 108, 255, 0.03);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(31, 108, 255, 0.1);
}
.est-service-card.is-selected {
  border-color: var(--brand-1);
  background: rgba(31, 108, 255, 0.06);
  box-shadow: 0 0 0 3px rgba(31, 108, 255, 0.15);
}
.est-service-card__icon {
  width: 40px;
  height: 40px;
  color: var(--brand-1);
}
.est-service-card__icon svg {
  width: 100%;
  height: 100%;
}
.est-service-card__label {
  font-size: 12px;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.4;
}
.est-service-card__base {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-1);
}
.est-service-card__badge {
  position: absolute;
  top: -8px;
  right: -8px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--grad);
  padding: 2px 8px;
  border-radius: 40px;
}
.est-service-card__check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: #fff;
  transition:
    background 0.2s,
    border-color 0.2s;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.est-service-card__check::after {
  content: "";
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) translate(-1px, -1px);
  opacity: 0;
  transition: opacity 0.15s;
}
.est-service-card.is-selected .est-service-card__check {
  background: var(--brand-1);
  border-color: var(--brand-1);
}
.est-service-card.is-selected .est-service-card__check::after {
  opacity: 1;
}

/* ---------- オプションエリア ---------- */
.est-opts {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
/* hidden属性がCSSのdisplay:flexに上書きされないようにする */
.est-opts[hidden] {
  display: none;
}
.est-opts__group {
}
.est-opts__group-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  padding-left: 10px;
  border-left: 3px solid var(--brand-1);
}

/* ラジオカード */
.est-radio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.est-radio-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 14px;
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  user-select: none;
}
.est-radio-card input {
  display: none;
}
.est-radio-card:hover {
  border-color: var(--brand-1);
  background: rgba(31, 108, 255, 0.02);
}
.est-radio-card--selected {
  border-color: var(--brand-1);
  background: rgba(31, 108, 255, 0.06);
}
.est-radio-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.4;
}
.est-radio-card__label small {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-top: 2px;
}
.est-radio-card__price {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-1);
}

/* チェックボックスカード */
.est-check-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.est-check-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-2);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
  user-select: none;
}
.est-check-card:hover {
  border-color: var(--brand-1);
  background: rgba(31, 108, 255, 0.02);
}
.est-check-card input[type="checkbox"] {
  display: none;
}
.est-check-card:has(input:checked) {
  border-color: var(--brand-1);
  background: rgba(31, 108, 255, 0.05);
}
.est-check-card__label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  flex: 1;
  line-height: 1.4;
}
.est-check-card:has(input:checked) .est-check-card__label {
  color: var(--brand-1);
}
.est-check-card__price {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--brand-1);
  white-space: nowrap;
  flex-shrink: 0;
}
.est-check-card__desc {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  display: block;
  grid-column: 1 / -1;
}
/* flex内での desc の配置調整 */
.est-check-card {
  flex-wrap: wrap;
}
.est-check-card__label,
.est-check-card__price {
  order: 0;
}
.est-check-card__desc {
  order: 1;
  width: 100%;
  margin-top: 4px;
  flex-basis: 100%;
}

/* =====================================================
   サマリーパネル
   ===================================================== */
.est-summary {
  position: sticky;
  top: 90px;
  align-self: start;
}
.est-summary__inner {
  background: var(--deep);
  border-radius: 20px;
  overflow: hidden;
}
.est-summary__head {
  padding: 28px 24px 20px;
  background: linear-gradient(135deg, rgba(31, 108, 255, 0.15), rgba(0, 198, 255, 0.08));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.est-summary__head .section-eyebrow {
  color: var(--brand-2);
  margin-bottom: 12px;
}
.est-summary__head .section-eyebrow::before {
  background: var(--brand-2);
}

/* 合計金額 */
.est-total {
  margin: 4px 0 6px;
}
.est-total__value {
  font-family: var(--display, "Space Grotesk", sans-serif);
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: block;
  line-height: 1.1;
  transition: all 0.3s ease;
}
.est-total__unit {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  display: block;
  margin-top: 4px;
  line-height: 1.5;
}
.est-total__note {
  font-family: var(--mono);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.35);
  margin: 0;
  letter-spacing: 0.06em;
}

/* 内訳リスト */
.est-summary__items {
  padding: 20px 24px;
  min-height: 80px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.est-summary__empty {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  line-height: 1.7;
  margin: 12px 0;
}
.est-summary__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.est-summary__item:last-child {
  border-bottom: none;
}
.est-summary__item--base .est-summary__item-label {
  font-weight: 700;
}
.est-summary__item--total {
  padding-top: 10px;
  margin-top: 4px;
}
.est-summary__item--total .est-summary__item-label {
  font-weight: 800;
  color: #fff;
}
.est-summary__item--total .est-summary__item-price {
  font-size: 15px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.est-summary__item-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  flex: 1;
  min-width: 0;
}
.est-summary__item-price {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  flex-shrink: 0;
}
.est-summary__divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 8px 0;
}

/* ボタン */
.est-summary__actions {
  padding: 20px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.est-summary__btn {
  display: block;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--sans);
  cursor: pointer;
  transition:
    opacity 0.2s,
    transform 0.2s;
  text-align: center;
}
.est-summary__btn:hover {
  transform: translateY(-1px);
}
.est-summary__btn--primary {
  background: var(--grad);
  color: #fff;
}
.est-summary__btn--primary:hover {
  opacity: 0.88;
}
.est-summary__btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.est-summary__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* =====================================================
   注意事項
   ===================================================== */
.est-notice {
  background: var(--deep);
}
.est-notice__inner {
  max-width: 760px;
  margin: 0 auto;
}
.est-notice__title {
  font-size: 15px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 16px;
}
.est-notice__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}
.est-notice__list li {
  display: flex;
  gap: 10px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.75;
  align-items: flex-start;
}
.est-notice__list li::before {
  content: "※";
  color: var(--brand-2);
  font-weight: 700;
  flex-shrink: 0;
}
.est-notice__list li strong {
  color: rgba(255, 255, 255, 0.85);
}

/* =====================================================
   レスポンシブ
   ===================================================== */
@media (max-width: 1000px) {
  .est-service-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .est-radio-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 860px) {
  .est-layout {
    grid-template-columns: 1fr;
  }
  .est-summary {
    position: static;
    order: -1;
  }
  .est-summary__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  .est-summary__head {
    grid-column: 1 / -1;
  }
  .est-summary__items {
    grid-column: 1;
  }
  .est-summary__actions {
    grid-column: 2;
    align-self: end;
  }
}
@media (max-width: 640px) {
  .est-service-grid {
    grid-template-columns: 1fr 1fr;
  }
  .est-check-grid {
    grid-template-columns: 1fr;
  }
  .est-radio-grid {
    grid-template-columns: 1fr;
  }
  .est-summary__inner {
    grid-template-columns: 1fr;
  }
  .est-summary__items {
    grid-column: 1;
  }
  .est-summary__actions {
    grid-column: 1;
  }
}
