/* HAMILLE 訪問歯科 — お問い合わせフォーム専用
   2026-08-19 に site-premium.css から分離。
   /contact/ 系 3 ページでしか使わないブロック。全 13 ページを走査して確認済み。
   ★ 読み込み順は必ず site-premium.css の「後」。 */



.visit-inquiry-form__consent {
  flex-direction: row !important;
  align-items: flex-start;
  gap: 10px !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
}

.visit-inquiry-form__consent input {
  margin-top: 4px;
  width: auto;
  flex-shrink: 0;
}


.container--contact {
  max-width: min(980px, 100%);
}


.contact-crumb {
  margin: 0 0 18px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}


.contact-crumb a:hover {
  color: var(--navy);
  text-decoration: underline;
}


.contact-progress {
  margin: 0 0 28px;
}


.contact-progress ol {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 1rem;
  color: var(--ink-soft);
}


.contact-progress li {
  position: relative;
}


.contact-progress li + li::before {
  content: ">";
  margin-right: 18px;
  color: var(--ink-soft);
}


.contact-form {
  margin-top: 8px;
  background: var(--white);
  border: 1px solid var(--line);
}


.contact-form .visit-inquiry-form__alert {
  margin: 16px 22px 0;
  padding: 12px 14px;
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--navy-deep);
  background: color-mix(in srgb, var(--navy) 8%, var(--white));
  border-left: 3px solid var(--navy);
}


.contact-form__row {
  display: grid;
  grid-template-columns: minmax(9.5rem, 11.5rem) minmax(0, 1fr);
  gap: 10px 28px;
  align-items: start;
  margin: 0;
  padding: 18px 22px;
  border-bottom: 1px dotted var(--line);
}


.contact-form__row:last-of-type {
  border-bottom: 0;
}


.contact-form__label {
  padding-top: 10px;
  font-size: var(--text-body);
  font-weight: 700;
  line-height: 1.5;
  color: var(--navy-deep);
}


.contact-form__control {
  min-width: 0;
}


.contact-form__hint {
  margin: 8px 0 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
}


.contact-form .visit-required {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 8px;
  /* 入力必須の判別に直結するため 11px→12px。
     2026-09-20 理事長のご指摘（字が小さい）を受け、サイトの下限 16px に合わせた。 */
  font-size: var(--text-note);
  font-weight: 700;
  line-height: 1.35;
  color: var(--white);
  background: var(--red);
  vertical-align: middle;
  border-radius: 2px;
}


.contact-form input[type="text"],
.contact-form input[type="tel"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--white);
  color: var(--ink);
  font: inherit;
  /* 入力した文字そのもの。高齢の利用者は打った内容を確認しづらい。 */
  font-size: var(--text-body);
  line-height: 1.6;
}


.contact-form textarea {
  min-height: 140px;
  resize: vertical;
}


.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 1px;
}


.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: var(--red);
}


.contact-radios {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}


.contact-radios label {
  display: flex;
  align-items: center;
  gap: 12px;
  /* 行そのものを押せるようにする。ラジオだけが的だと 14px しかなく、
     高齢の利用者には狙えない。 */
  min-height: 44px;
  padding: 8px 10px;
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.55;
  color: var(--ink);
  cursor: pointer;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.contact-radios label:hover {
  border-color: color-mix(in srgb, var(--navy) 40%, var(--line));
}

.contact-radios label:has(input:checked) {
  border-color: var(--navy);
  background: color-mix(in srgb, var(--navy) 5%, var(--white));
}

.contact-radios input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid var(--navy);
  border-radius: 50%;
  background: var(--white);
  cursor: pointer;
}

.contact-radios input[type="radio"]:checked {
  border-width: 6px;
}

.contact-radios input[type="radio"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--navy) 45%, transparent);
  outline-offset: 2px;
}


.contact-radios input {
  margin-top: 4px;
  width: 1.05em;
  height: 1.05em;
  flex-shrink: 0;
  accent-color: var(--navy);
}


.contact-form__error {
  min-height: 1.2em;
  margin: 6px 0 0;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--red);
}


.contact-form__hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}


.contact-form__footer {
  padding: 8px 22px 24px;
}


.contact-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  font-size: var(--text-body);
  font-weight: 500;
  line-height: 1.65;
}


/* 既定サイズ（14×14px）では高齢の利用者がタップできない。
   必須項目なので、ここで詰まると送信自体が完了しない。
   視覚 24px・タップ判定 44px（Apple HIG 最小）を確保する。 */
.contact-form__consent input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid var(--navy);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}

/* タップ判定だけを 44px に広げる（見た目は 24px のまま） */
.contact-form__consent input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 44px;
  height: 44px;
  transform: translate(-50%, -50%);
}

.contact-form__consent input[type="checkbox"]:checked {
  background: var(--navy);
}

.contact-form__consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 7px;
  width: 6px;
  height: 12px;
  border: solid var(--white);
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.contact-form__consent input[type="checkbox"]:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--navy) 45%, transparent);
  outline-offset: 2px;
}


.contact-form__consent a {
  color: var(--navy);
  text-decoration: underline;
}


.contact-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}


.contact-form__note {
  margin: 14px 0 0;
  font-size: var(--text-note);
  line-height: 1.85;
  color: var(--ink-soft);
}


.contact-thanks {
  padding: 8px 0 12px;
}


.contact-thanks__lead {
  margin: 0 0 22px;
  font-size: var(--text-body);
  line-height: 1.9;
  color: var(--ink-soft);
}


.contact-thanks__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


@media (max-width: 720px) {
  /* 従来はラベルの padding しか変えておらず、2 カラムのまま。
     393px 幅の端末では入力欄が 107px まで潰れて実用にならなかった。 */
  .contact-form__row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 16px 16px 18px;
  }

  .contact-form__label {
    padding-top: 0;
  }

  .contact-form {
    padding: 0;
  }

  .contact-form__footer,
  .contact-form__actions {
    padding-inline: 16px;
  }

  /* 送信ボタンは横幅いっぱいに */
  .contact-form__actions .btn {
    width: 100%;
    min-width: 0;
  }

  /* 入力欄を選ぶと、ブラウザがその欄を画面の一番下まで運ぶ。
     そこは固定バーの位置で、いま打っている欄が隠れてしまう。
     自動スクロールの着地点をバーのぶんだけ上げる。 */
  .contact-form input,
  .contact-form textarea,
  .contact-radios label,
  .contact-form__consent {
    scroll-margin-bottom: calc(var(--mobile-bar-offset) + 16px);
  }
}
