/* お問い合わせ（プロフェッショナル） /professional/contact/
   header.php が is_page('contact') のときだけ読み込む。
   全セレクタを #rnw-cpro 配下にスコープしている（汎用クラス名のため）。 */

#rnw-cpro {
  --teal: #2c6e6a;
  --teal-deep: #205350;
  --teal-soft: #e2efee;
  --ink: #33384a;
  --sub: #8a90a2;
  --line: #e3e6ee;
  --bg: #eef2f2;

  margin: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.75;
  padding: 32px 16px;
  -webkit-font-smoothing: antialiased;
}

#rnw-cpro,
#rnw-cpro *,
#rnw-cpro *::before,
#rnw-cpro *::after { box-sizing: border-box; }

/* --- 旧CSS（/professional/css/*.css）の打ち消し ---
   .head .body .card .btn .nav などは汎用名のため、旧CSS側の指定が
   このフォームにも当たる。#rnw-cpro スコープで詳細度は勝つが、
   こちらが指定していないプロパティは漏れるので、ここで初期化しておく。 */
#rnw-cpro h1,
#rnw-cpro p,
#rnw-cpro dl,
#rnw-cpro dt,
#rnw-cpro dd,
#rnw-cpro form,
#rnw-cpro label { margin: 0; padding: 0; background: none; border: 0; }

#rnw-cpro input[type="text"],
#rnw-cpro textarea,
#rnw-cpro select,
#rnw-cpro button {
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: inherit;
  font-family: inherit;
  line-height: normal;
  -webkit-appearance: none;
          appearance: none;
}

#rnw-cpro input[type="checkbox"],
#rnw-cpro input[type="radio"] { width: auto; height: auto; margin: 0; padding: 0; }

#rnw-cpro .head::before,  #rnw-cpro .head::after,
#rnw-cpro .body::before,  #rnw-cpro .body::after,
#rnw-cpro .panel::before, #rnw-cpro .panel::after,
#rnw-cpro .card::before,  #rnw-cpro .card::after,
#rnw-cpro .field::before, #rnw-cpro .field::after,
#rnw-cpro .nav::before,   #rnw-cpro .nav::after,
#rnw-cpro .btn::before,   #rnw-cpro .btn::after { content: none; }

/* --- ここから本体（元CSSに #rnw-cpro を付けたもの） --- */

#rnw-cpro .shell { max-width: 640px; margin: 0 auto; }

#rnw-cpro .head { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%); color: #fff; border-radius: 16px 16px 0 0; padding: 30px 32px 26px; }
#rnw-cpro .head h1 { margin: 0 0 6px; font-size: 20px; letter-spacing: .04em; }
#rnw-cpro .head p { margin: 0; font-size: 12.5px; color: rgba(255,255,255,.82); }

#rnw-cpro .steps { display: flex; margin: 22px 0 2px; }
#rnw-cpro .snode { flex: 1; text-align: center; position: relative; }
#rnw-cpro .snode::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: rgba(255,255,255,.24); }
#rnw-cpro .snode:first-child::before { display: none; }
#rnw-cpro .snode.done::before, #rnw-cpro .snode.active::before { background: rgba(255,255,255,.9); }
#rnw-cpro .sdot { width: 28px; height: 28px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: rgba(255,255,255,.2); color: #fff; position: relative; z-index: 1; transition: background .25s, transform .25s; }
#rnw-cpro .snode.active .sdot { background: #fff; color: var(--teal); transform: scale(1.08); }
#rnw-cpro .snode.done .sdot { background: rgba(255,255,255,.9); color: var(--teal); }
#rnw-cpro .slabel { font-size: 10.5px; color: rgba(255,255,255,.78); }
#rnw-cpro .snode.active .slabel { color: #fff; }

#rnw-cpro .body { background: #fff; border-radius: 0 0 16px 16px; padding: 30px 32px 34px; box-shadow: 0 8px 30px rgba(32,83,80,.1); }
#rnw-cpro .panel { display: none; animation: rnw-cpro-fade .3s ease; }
#rnw-cpro .panel.active { display: block; }
@keyframes rnw-cpro-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#rnw-cpro .lead { text-align: center; font-size: 15px; font-weight: 600; margin: 4px 0 8px; }
#rnw-cpro .psub { text-align: center; font-size: 12.5px; color: var(--sub); margin: 0 0 22px; }

#rnw-cpro .cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
#rnw-cpro .card { border: 2px solid var(--line); border-radius: 12px; padding: 16px 14px; cursor: pointer; transition: border-color .2s, box-shadow .2s, background .2s; position: relative; display: flex; align-items: center; min-height: 60px; }
#rnw-cpro .card:hover { border-color: var(--teal); }
#rnw-cpro .card.selected { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 4px 14px rgba(44,110,106,.16); }
#rnw-cpro .card .tt { font-size: 13.5px; font-weight: 700; padding-right: 24px; }
#rnw-cpro .card .chk { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 5px; border: 2px solid var(--line); display: grid; place-items: center; font-size: 12px; color: #fff; }
#rnw-cpro .card.selected .chk { background: var(--teal); border-color: var(--teal); }
#rnw-cpro .card input { position: absolute; opacity: 0; pointer-events: none; }
#rnw-cpro .card.wide { grid-column: 1 / -1; }

#rnw-cpro .radios { display: flex; flex-direction: column; gap: 10px; }
#rnw-cpro .radio-row { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--line); border-radius: 10px; padding: 13px 16px; cursor: pointer; font-size: 14px; transition: border-color .2s, background .2s; }
#rnw-cpro .radio-row:hover { border-color: var(--teal); }
#rnw-cpro .radio-row:focus-within { outline: 3px solid var(--teal-deep); outline-offset: 3px; }
#rnw-cpro .radio-row.selected { border-color: var(--teal); background: var(--teal-soft); }
#rnw-cpro .radio-row .dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); flex: 0 0 auto; position: relative; }
#rnw-cpro .radio-row.selected .dot { border-color: var(--teal); }
#rnw-cpro .radio-row.selected .dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--teal); }
#rnw-cpro .radio-row input { position: absolute; opacity: 0; pointer-events: none; }

#rnw-cpro .field { margin-bottom: 18px; }
#rnw-cpro .request-field { margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
#rnw-cpro .field .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
#rnw-cpro .req { color: var(--teal); font-size: 11px; margin-left: 6px; }
#rnw-cpro .opt { color: var(--sub); font-size: 11px; margin-left: 6px; }
#rnw-cpro .field input[type="text"], #rnw-cpro .field textarea { width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-family: inherit; background: #fbfcfe; }
#rnw-cpro .field textarea { min-height: 90px; resize: vertical; }
/* プルダウン。appearance:none で消した矢印を背景の三角で出し直す */
#rnw-cpro .field select { width: 100%; max-width: 260px; padding: 11px 36px 11px 13px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; background: #fbfcfe url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0h10L5 6z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; }
#rnw-cpro .field select:focus { outline: none; border-color: var(--teal); }
#rnw-cpro .field input:focus, #rnw-cpro .field textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
#rnw-cpro .hint { font-size: 11.5px; color: var(--sub); margin-top: 5px; }
#rnw-cpro .err { color: #d64d6d; font-size: 12px; margin-top: 5px; }

/* formrun SDK のエラー表示。SDKは該当欄の error 要素に formrun-system-show を
   付け外しするだけで display は面倒を見ないので、既定を隠してここで出す。
   （id が付いている err1・err2 はステップ判定用で contact.js が直接出し入れする） */
#rnw-cpro [data-formrun-show-if-error] { display: none; }
#rnw-cpro [data-formrun-show-if-error].formrun-system-show { display: block; }

#rnw-cpro .consent { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; background: #f7f8fb; padding: 14px 16px; border-radius: 8px; }
#rnw-cpro .consent input { margin-top: 4px; }

#rnw-cpro .review { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
#rnw-cpro .review dl { margin: 0; display: grid; grid-template-columns: 40% 60%; }
#rnw-cpro .review dt { background: #f7f8fb; padding: 11px 14px; font-size: 12.5px; color: var(--sub); border-bottom: 1px solid var(--line); }
#rnw-cpro .review dd { margin: 0; padding: 11px 14px; font-size: 13.5px; border-bottom: 1px solid var(--line); word-break: break-all; }
#rnw-cpro .review dl:last-child dt, #rnw-cpro .review dl:last-child dd { border-bottom: none; }

#rnw-cpro .nav { display: flex; gap: 12px; margin-top: 26px; }
#rnw-cpro .btn { flex: 1; padding: 13px; border-radius: 26px; font-size: 14.5px; font-weight: 700; font-family: inherit; cursor: pointer; border: none; transition: background .2s, opacity .2s; }
#rnw-cpro .btn-next { background: var(--teal); color: #fff; }
#rnw-cpro .btn-next:hover { background: var(--teal-deep); }
#rnw-cpro .btn-back { background: #fff; color: var(--teal); border: 1.5px solid var(--line); flex: 0 0 120px; }
#rnw-cpro .btn-back:hover { border-color: var(--teal); }
#rnw-cpro .btn-submit { background: var(--teal); color: #fff; }
#rnw-cpro .btn-submit:disabled { opacity: .45; cursor: not-allowed; }

@media (max-width: 480px) {
  #rnw-cpro .cards, #rnw-cpro .review dl { grid-template-columns: 1fr; }
  #rnw-cpro .review dt { border-bottom: none; }
  #rnw-cpro .head, #rnw-cpro .body { padding-left: 20px; padding-right: 20px; }
  #rnw-cpro .slabel { font-size: 9.5px; }
}

/* 固定ヘッダーの下にフォームを配置する */
#rnw-cpro { padding-top: calc(var(--rnw-header-h-sp, 70px) + 32px); }
#rnw-cpro .shell, #rnw-cpro .field, #rnw-cpro .btn-next { scroll-margin-top: calc(var(--rnw-header-h-sp, 70px) + 24px); }
#rnw-cpro .card:focus-within { outline: 3px solid var(--teal-deep); outline-offset: 3px; }
@media (min-width: 768px) {
  #rnw-cpro { padding-top: calc(var(--rnw-header-h-pc, 90px) + 32px); }
  #rnw-cpro .shell, #rnw-cpro .field, #rnw-cpro .btn-next { scroll-margin-top: calc(var(--rnw-header-h-pc, 90px) + 24px); }
}
