/*
 * reform-estimate-simulator.css
 * /wp-content/themes/your-theme/css/ に設置してください
 * Google Fonts（Outfit + Noto Sans JP）は functions.php で読み込み済み
 */

/* ══ CSS変数 ══ */
.reform-simulator-wrap {
  --navy-900: #0b1426;
  --navy-800: #0f1e38;
  --navy-700: #162544;
  --navy-600: #1d3060;
  --blue:     #3b7dd8;
  --sky:      #5ea8f5;
  --gold:     #e8a020;
  --gold-dim: rgba(232, 160, 32, 0.12);
  --white:    #f0f4ff;
  --muted:    #7a8fb5;
  --border:   rgba(91, 130, 210, 0.2);
  --surface:  rgba(21, 40, 80, 0.6);
  --success:  #34c97a;
}

/* ══ ラッパー ══ */
.reform-simulator-wrap {
  max-width: 780px;
  margin: 0 auto;
  font-family: 'Noto Sans JP', sans-serif;
  color: var(--white);
}

/* ══ ステップインジケーター ══ */
.reform-simulator-wrap .step-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.reform-simulator-wrap .step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.reform-simulator-wrap .step-dot-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--navy-800);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.3s;
  position: relative;
  z-index: 1;
}

.reform-simulator-wrap .step-dot.active .step-dot-circle {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(59, 125, 216, 0.2);
}

.reform-simulator-wrap .step-dot.done .step-dot-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
  font-size: 0;
}

.reform-simulator-wrap .step-dot.done .step-dot-circle::after {
  content: '✓';
  font-size: 16px;
}

.reform-simulator-wrap .step-dot-label {
  font-size: 10px;
  font-family: 'Outfit', sans-serif;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
  text-transform: uppercase;
  font-weight: 600;
}

.reform-simulator-wrap .step-dot.active .step-dot-label { color: var(--sky); }
.reform-simulator-wrap .step-dot.done .step-dot-label   { color: var(--success); }

.reform-simulator-wrap .step-line {
  width: 80px;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.reform-simulator-wrap .step-line-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--blue);
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 500px) {
  .reform-simulator-wrap .step-line { width: 36px; }
}

/* ══ ステップパネル ══ */
.reform-simulator-wrap .step-panels {
  position: relative;
}

.reform-simulator-wrap .step-panel {
  display: none;
  animation: reformFadeIn 0.35s ease;
}

.reform-simulator-wrap .step-panel.active {
  display: block;
}

@keyframes reformFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ══ カード ══ */
.reform-simulator-wrap .reform-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 40px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04) inset,
    0 24px 64px rgba(0, 0, 0, 0.4);
}

@media (max-width: 500px) {
  .reform-simulator-wrap .reform-card { padding: 24px 18px; }
}

.reform-simulator-wrap .card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--sky);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.reform-simulator-wrap .card-title::before {
  content: '';
  width: 28px;
  height: 2px;
  background: var(--sky);
  flex-shrink: 0;
}

/* ══ STEP1：工事種別カード ══ */
.reform-simulator-wrap .work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 10px;
}

@media (max-width: 500px) {
  .reform-simulator-wrap .work-grid { grid-template-columns: repeat(2, 1fr); }
}

.reform-simulator-wrap .work-card {
  position: relative;
  cursor: pointer;
}

.reform-simulator-wrap .work-card input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.reform-simulator-wrap .work-card-inner {
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 20px 12px 16px;
  text-align: center;
  transition: all 0.2s;
  background: rgba(15, 30, 56, 0.5);
  cursor: pointer;
  user-select: none;
}

.reform-simulator-wrap .work-card-inner:hover {
  border-color: rgba(94, 168, 245, 0.4);
  background: rgba(59, 125, 216, 0.08);
}

.reform-simulator-wrap .work-card input:checked + .work-card-inner {
  border-color: var(--blue);
  background: rgba(59, 125, 216, 0.15);
  box-shadow: 0 0 0 1px var(--blue) inset;
}

.reform-simulator-wrap .work-icon {
  font-size: 32px;
  margin-bottom: 8px;
  display: block;
  line-height: 1;
}

.reform-simulator-wrap .work-name {
  font-family: 'Outfit', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 4px;
}

.reform-simulator-wrap .work-range {
  font-family: 'Outfit', sans-serif;
  font-size: 10px;
  color: var(--muted);
  color: #83afff;
}

.reform-simulator-wrap .work-check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: transparent;
  background: transparent;
  transition: all 0.2s;
}

.reform-simulator-wrap .work-card input:checked + .work-card-inner .work-check {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ══ STEP2：詳細条件 ══ */
.reform-simulator-wrap .detail-sections {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.reform-simulator-wrap .detail-section {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.reform-simulator-wrap .detail-section-head {
  padding: 14px 20px;
  background: rgba(21, 40, 80, 0.8);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  border-bottom: 1px solid var(--border);
}

.reform-simulator-wrap .detail-section-head .icon {
  font-size: 18px;
}

.reform-simulator-wrap .detail-section-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.reform-simulator-wrap .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 500px) {
  .reform-simulator-wrap .field-row { grid-template-columns: 1fr; }
}

.reform-simulator-wrap .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reform-simulator-wrap .field label {
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.reform-simulator-wrap .field select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(11, 20, 38, 0.8);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 13px;
  color: var(--white);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.reform-simulator-wrap .field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 125, 216, 0.15);
}

/* グレードトグル */
.reform-simulator-wrap .grade-toggle {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.reform-simulator-wrap .grade-toggle input[type="radio"] {
  display: none;
}

.reform-simulator-wrap .grade-toggle label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  background: rgba(11, 20, 38, 0.6);
  text-align: center;
}

.reform-simulator-wrap .grade-toggle label:hover {
  border-color: rgba(94, 168, 245, 0.4);
}

.reform-simulator-wrap .grade-toggle input:checked + label {
  border-color: var(--gold);
  background: var(--gold-dim);
  box-shadow: 0 0 0 1px var(--gold) inset;
}

.reform-simulator-wrap .grade-name {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.04em;
}

.reform-simulator-wrap .grade-sub {
  font-size: 9px;
  color: var(--muted);
}

/* ══ STEP3：お客様情報 ══ */
.reform-simulator-wrap .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
	.reform-simulator-wrap .nav-row {
    flex-direction: column;
	}
  .reform-simulator-wrap .contact-grid { grid-template-columns: 1fr; }
}

.reform-simulator-wrap .contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.reform-simulator-wrap .contact-field.full {
  grid-column: 1 / -1;
}

.reform-simulator-wrap .contact-field label {
  font-size: 11px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.reform-simulator-wrap .contact-field input[type="text"],
.reform-simulator-wrap .contact-field input[type="email"],
.reform-simulator-wrap .contact-field input[type="tel"],
.reform-simulator-wrap .contact-field textarea,
.reform-simulator-wrap .wpcf7-form-control:not(.wpcf7-submit) {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(11, 20, 38, 0.8);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 14px;
  color: var(--white);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.reform-simulator-wrap .contact-field textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.6;
}

.reform-simulator-wrap .contact-field input:focus,
.reform-simulator-wrap .contact-field textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 125, 216, 0.15);
}

.reform-simulator-wrap .contact-field input::placeholder,
.reform-simulator-wrap .contact-field textarea::placeholder {
  color: rgba(122, 143, 181, 0.4);
}

/* ══ 見積もりボックス ══ */
.reform-simulator-wrap .estimate-box {
  background: var(--navy-700);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}

.reform-simulator-wrap .estimate-box-title {
  font-family: 'Outfit', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.reform-simulator-wrap .estimate-items {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 12px;
}

.reform-simulator-wrap .estimate-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid rgba(91, 130, 210, 0.1);
  font-size: 13px;
}

.reform-simulator-wrap .estimate-item-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.reform-simulator-wrap .estimate-item-name .icon {
  font-size: 14px;
}

.reform-simulator-wrap .estimate-item-value {
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  color: var(--white);
  font-size: 14px;
}

.reform-simulator-wrap .estimate-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 12px;
  border-top: 1px solid rgba(94, 168, 245, 0.3);
}

.reform-simulator-wrap .estimate-total-label {
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--sky);
  letter-spacing: 0.04em;
}

.reform-simulator-wrap .estimate-total-value {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.02em;
  line-height: 1;
}

.reform-simulator-wrap .estimate-total-value span {
  font-size: 0.45em;
  font-weight: 400;
  color: var(--muted);
  margin-left: 4px;
}

.reform-simulator-wrap .estimate-note {
  font-size: 10px;
  color: var(--muted);
  margin-top: 8px;
  line-height: 1.7;
}

/* ══ ナビボタン ══ */
.reform-simulator-wrap .nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}
.reform-simulator-wrap .nav-col {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  gap: 12px;
}

.reform-simulator-wrap .reform-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.reform-simulator-wrap .reform-btn-back {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.reform-simulator-wrap .reform-btn-back:hover {
  border-color: rgba(94, 168, 245, 0.4);
  color: var(--sky);
}

.reform-simulator-wrap .reform-btn-next {
  background: var(--blue);
  color: #fff;
  margin-left: auto;
  box-shadow: 0 4px 20px rgba(59, 125, 216, 0.35);
}

.reform-simulator-wrap .reform-btn-next:hover {
  background: var(--sky);
  transform: translateY(-1px);
}

/* CF7 送信ボタン */
.reform-simulator-wrap .wpcf7-submit,
.reform-simulator-wrap .reform-btn-submit {
  background: var(--gold);
  color: var(--navy-900);
  margin-left: auto;
  border: none;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(232, 160, 32, 0.35);
  transition: all 0.2s;
}

.reform-simulator-wrap .wpcf7-submit:hover,
.reform-simulator-wrap .reform-btn-submit:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 28px rgba(232, 160, 32, 0.5);
}

/* ══ CF7 バリデーション ══ */
.reform-simulator-wrap .wpcf7-not-valid-tip {
  font-size: 11px;
  color: #ff7b72;
  margin-top: 4px;
  display: block;
}

.reform-simulator-wrap .wpcf7-not-valid {
  border-color: #ff7b72 !important;
}

/* ══ 送信完了メッセージ ══ */
.reform-simulator-wrap .wpcf7-mail-sent-ok,
#reform-success-panel {
  display: none;
  text-align: center;
  padding: 48px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  animation: reformFadeIn 0.4s ease;
}

.reform-simulator-wrap .success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(52, 201, 122, 0.15);
  border: 2px solid var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px;
}

.reform-simulator-wrap .success-title {
  font-family: 'Outfit', sans-serif;
  font-size: 22px;
  font-weight: 900;
  color: var(--success);
  margin-bottom: 10px;
}

.reform-simulator-wrap .success-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.8;
}

/* ══ エラーメッセージ ══ */
.reform-simulator-wrap .reform-error-msg {
  display: none;
  font-size: 11px;
  color: #ff7b72;
  margin-top: 10px;
  padding: 8px 12px;
  background: rgba(255, 123, 114, 0.08);
  border: 1px solid rgba(255, 123, 114, 0.2);
  border-radius: 6px;
}

.reform-simulator-wrap .reform-error-msg.show {
  display: block;
}

/* ══ ヒントテキスト ══ */
.reform-simulator-wrap .hint-text {
  font-size: 11px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
  letter-spacing: 0.02em;
}