@charset "UTF-8";

/* お問い合わせページ（issue #40）。設計図の画面は無く、新版フィードバック（221026）の PPT の第32ページの
   参考図をもとにした。2026-11-04 に、お客様の資料（031126）の第4ページの参考図に合わせて、Studio／Home の選択と
   画像の添付を足した。ヘッダー・フッター・操作は common.css / script.js を共有する。
   入力欄の見た目は、0927版の HOME の予約フォーム（1006版で削除。git show 5578546 -- code/site/home.css）を
   土台にしている。 */

.contact { padding-block: 72px 96px; }
.contact__inner { max-width: 1008px; }

.contact__title {
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: .14em;
  text-align: center;
  color: var(--c-blue);
}
.contact__lead {
  margin-top: 20px;
  font-size: 17px;
  line-height: 2;
  letter-spacing: .04em;
  text-align: center;
  color: var(--c-ink-body);
}

/* フォーム。参考図（031126 の第4ページ）どおり、デスクトップは2列（お名前｜貴社名、メール｜お問い合わせの種類、電話）。
   お問い合わせ内容・画像の添付・送信ボタンは全幅。項目はフォームの直下に並ぶ（WordPress も同じ）。
   写真付きの選択（Studio／Home）は issue #74 でページから外したが、管理画面で足せるので、全幅の規則は残している。 */
.booking {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px 48px;
  margin-top: 48px;
  padding: 48px 56px 40px;
  background: var(--c-panel-alt);
  border-radius: var(--r-lg);
}
.booking .field:has(> .field__control > textarea),
.booking .field--choices,
.booking .field--images,
.booking__submit,
.booking__status,
.booking__note { grid-column: 1 / -1; }

.field { display: grid; row-gap: 8px; align-content: start; }
.field__label {
  font-size: 16px; font-weight: 700; line-height: 1.4;
  letter-spacing: .04em;
  color: var(--c-ink);
}
.field__control { min-width: 0; }

.booking input,
.booking select,
.booking textarea {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  font: inherit;
  font-size: 16px;  /* 16px より小さいと、iOS の Safari が入力のときに拡大する */
  color: inherit;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.booking textarea {
  display: block;
  height: auto;
  min-height: 200px;
  padding-block: 12px;
  line-height: 1.7;
  resize: vertical;
}
.booking input::placeholder,
.booking textarea::placeholder { color: #b4b4b4; }
.booking input:hover,
.booking select:hover,
.booking textarea:hover { border-color: #8f8f8f; }
.booking input:focus-visible,
.booking select:focus-visible,
.booking textarea:focus-visible {
  outline: none;
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(20, 104, 180, .2);
}
.booking [aria-invalid="true"] { border-color: #c0392b; }
.booking [aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(192, 57, 43, .2); }

.select { position: relative; }
.select select { appearance: none; padding-right: 40px; cursor: pointer; }
.select__caret {
  position: absolute; right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--c-ink);
  pointer-events: none;
}

.field__error {
  margin-top: 6px;
  font-size: 13px; line-height: 1.6;
  color: #c0392b;
}

/* ---------- Studio／Home の選択（写真付きのチェックボックス） ---------- */
/* fieldset と legend の既定の枠と余白を外し、ほかの項目（.field）と同じ見た目にする。
   legend は grid の項目にならないので、入力欄との間は下の余白で空ける。 */
.field--choices { margin: 0; padding: 0; border: 0; min-width: 0; }
.field--choices > .field__label { padding: 0; margin-bottom: 8px; }
/* 2枚のカードは、上の2列の入力欄と左右の位置をそろえる（列の間も .booking と同じ 48px） */
.choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 48px;
}
.choice { display: grid; row-gap: 10px; align-content: start; cursor: pointer; }
.choice__head {
  display: inline-flex; align-items: flex-start; gap: 10px;
  font-size: 16px; font-weight: 700; line-height: 1.4;
  letter-spacing: .02em;
  color: var(--c-ink);
}
/* 上の .booking input（文字の入力欄の見た目）を打ち消す */
.booking .choice input {
  flex: none;
  width: 20px; height: 20px;
  margin: 1px 0 0; padding: 0;  /* 名前の1行目と高さをそろえる（狭い画面では名前が2行になる） */
  accent-color: var(--c-blue);
  cursor: pointer;
}
.choice__photo {
  width: 100%; height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 2px solid var(--c-line-soft);
  border-radius: var(--r-md);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.choice:hover .choice__photo { border-color: #8f8f8f; }
.choice:has(input:checked) .choice__photo {
  border-color: var(--c-blue);
  box-shadow: 0 0 0 3px rgba(20, 104, 180, .2);
}
.field--choices[aria-invalid="true"] .choice__photo { border-color: #c0392b; }

/* ---------- 画像の添付（任意） ---------- */
/* 入力欄そのものは .visually-hidden で隠し、「ファイルを選択」の label で開く。
   上の .booking input が幅と高さを付けるので、隠すための大きさに戻す。 */
.booking .dropzone__input { width: 1px; height: 1px; padding: 0; border: 0; }
.dropzone {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 16px 24px;
  padding: 24px 28px;
  background: #fff;
  border: 1px dashed var(--c-line);
  border-radius: var(--r-sm);
  transition: border-color .18s ease, background-color .18s ease;
}
/* ドラッグした画像が枠の上にあるとき（script.js が付ける） */
.dropzone.is-dragover { border-color: var(--c-blue); background: #eaf3fb; }
.dropzone:has(.dropzone__input[aria-invalid="true"]) { border-color: #c0392b; }
.dropzone__icon {
  flex: none;
  width: 44px; height: 44px;
  fill: none; stroke: #8f8f8f;
  stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round;
}
.dropzone__text {
  flex: 1 1 260px;
  font-size: 14px; line-height: 1.7;
  color: var(--c-ink-body);
}
.dropzone__hint { display: block; font-size: 13px; }
.dropzone__button {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 8px 20px;
  background: #fff;
  border: 1px solid var(--c-blue);
  border-radius: var(--r-sm);
  font-size: 15px; font-weight: 700; letter-spacing: .04em;
  color: var(--c-blue);
  cursor: pointer;
  transition: background-color .18s ease;
}
.dropzone__button:hover { background: var(--c-panel-alt); }
.dropzone__button .icon { width: 18px; height: 18px; }
/* キーボードで隠れた入力欄を選んだときは、ボタンに枠を出す */
.dropzone__input:focus-visible + .dropzone__button { box-shadow: 0 0 0 3px rgba(20, 104, 180, .3); }
/* 選んだ画像の一覧 */
.dropzone__list { display: grid; gap: 8px; margin-top: 12px; }
.dropzone__list[hidden] { display: none; }
.dropzone__list li {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-sm);
  font-size: 14px; line-height: 1.5;
}
.dropzone__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dropzone__size { flex: none; font-size: 13px; color: var(--c-ink-body); }
.dropzone__remove {
  flex: none;
  padding: 4px 12px;
  background: none;
  border: 1px solid var(--c-line);
  border-radius: var(--r-sm);
  font: inherit; font-size: 13px;
  color: var(--c-ink);
  cursor: pointer;
}
.dropzone__remove:hover { border-color: #c0392b; color: #c0392b; }

.booking__submit {
  justify-self: center;
  width: min(100%, 320px);
  min-height: 56px;
  margin-top: 8px;
  font-size: 18px;
  letter-spacing: .12em;
}
.booking__submit:disabled { opacity: .6; cursor: progress; }

.booking__status {
  min-height: 1.5em;
  white-space: pre-line;  /* WordPress では、受け付けた文言の次の行に、お問い合わせの種類ごとの案内を出す */
  margin-top: -12px;
  font-size: 15px; font-weight: 700; line-height: 1.7; text-align: center;
  color: var(--c-blue);
}
.booking__status[data-state="error"] { color: #c0392b; }

.booking__note {
  margin-top: -12px;
  font-size: 13px; line-height: 1.7; text-align: center;
  color: var(--c-ink-faint);
}

@media (max-width: 1024px) {
  .contact { padding-block: 48px 72px; }
  .contact__lead { font-size: 16px; }
  .contact__lead br { display: none; }

  /* 1列に */
  .booking {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    margin-top: 32px;
    padding: 32px 32px 28px;
  }
}

@media (max-width: 767px) {
  .contact { padding-block: 36px 56px; }
  .contact__lead { text-align: left; font-size: 15px; }
  .booking { padding: 24px 16px 20px; border-radius: var(--r-md); }
  .booking__submit { width: 100%; font-size: 17px; min-height: 52px; }
  .choices { gap: 12px 16px; }
  .choice__head { font-size: 15px; gap: 8px; }
  .dropzone { padding: 20px 16px; }
  .dropzone__icon { display: none; }
}
