@import url("./common.css");

/* 隠しボタンを非表示にする */
#mailfrom_hidden_object {
  display: none !important;
}

/* ==============================================
   メディアクエリ - 画面幅ごとのスタイル
   ============================================== */

.inquiry-page {
  min-height: 100vh;
  background-color: #f4f4f4;
  margin: 0 0 80px;
  max-width: 1220px;
}

.inquiry-header {
  color: #1e1f1f;
  font-size: 40px;
  font-weight: bold;
  margin: 0 0 20px;
}

.inquiry-lead {
  color: var(--color-black);
  font-size: var(--font-size-pc-base);
}

/* ==============================================
   お問い合わせフォーム スタイル
   ============================================== */

/* フォーム全体のコンテナ */
.mailform {
  margin: 20px auto 0;
  padding: 30px 60px;
  background-color: var(--color-white);
  width: 100%;
}

/* フォームのテーブル要素 */
.mailform table {
  width: 100%;
  border-collapse: collapse; /* ボーダーを重ねる */
}

.mailform th,
.mailform td {
  padding: 24px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid #f0f0f0; /* 各項目の区切り線 */
}

/* ラベル（th）のスタイル */
.mailform th {
  width: 240px; /* PCでのラベル幅を固定 */
  font-weight: var(--font-weight-bold);
  color: var(--color-black);
  position: relative;
}

/* 最後の項目の下線を削除 */
.mailform tr:last-of-type th,
.mailform tr:last-of-type td {
  border-bottom: none;
}

.mailform th span {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: #6c757d;
}

/* 必須項目のラベル */
.mailform .must {
  display: none; /* 元の画像は非表示 */
}

/* 必須項目を持つth要素にバッジを追加 */
.mailform th:has(.must)::after {
  content: "必須";
  display: inline-block;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: var(--font-weight-regular);
  color: var(--color-white);
  background-color: var(--color-primary);
  border-radius: 4px;
  vertical-align: middle;
}

/* 入力欄（input, textarea, select）の共通スタイル */
.mailform .mfp {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--font-family);
  color: var(--color-black);
  background-color: #fcfcfc;
  border: 1px solid #ced4da;
  border-radius: 4px;
  box-sizing: border-box; /* paddingとborderをwidthに含める */
}

.mailform .mfp:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgb(46 87 164 /15%);
}

/* 姓名やフリガナなど、短い入力欄の調整 */
.name-input-container {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.name-input-group {
  flex: 1;
}

.name-input-group label {
  display: block;
  margin-bottom: 4px;
  font-weight: var(--font-weight-bold);
  color: var(--color-black);
}

.mailform input[name="姓(必須)"],
.mailform input[name="名(必須)"],
.mailform input[name="セイ"],
.mailform input[name="メイ"] {
  width: 100%;
  box-sizing: border-box;
}

.name-input-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  margin-bottom: 10px;
}

.name-input-row-label {
  flex-direction: row;
  white-space: nowrap;
}

/* 郵便番号検索リンク */
.mailform td a {
  margin-left: 16px;
  color: var(--color-primary);
  text-decoration: none;
  font-size: 15px;
}

.mailform td a:hover {
  text-decoration: underline;
}

/* 送信ボタンエリア */
.mfp-buttons {
  margin-top: 40px;
  text-align: center;
}

.mfp-buttons ul {
  /* IDセレクタに変更 */
  padding: 0;
  list-style: none;
}

.mfp-buttons li {
  display: inline-block;
  margin: 0 10px;
}

/* 住所入力欄の調整 */
.mailform ol {
  list-style: none;
  padding: 0;
}

.mailform ol li:not(:last-child) {
  margin-bottom: 12px;
}

/* エラーメッセージ */
.mfp-err {
  margin-top: 8px;
  color: #dc3545;
  font-size: 14px;
}

/* ボタンの共通スタイル */
.mfp-buttons input[type="button"] {
  appearance: none;
  border: none;
  border-radius: 8px;
  padding: 16px 60px;
  font-size: 18px;
  font-weight: var(--font-weight-bold);
  font-family: var(--font-family);
  cursor: pointer;
  /* transition: all 0.3s; */
}

/* リセットボタン */
.button-mfp-reset {
  width: 180px;
  height: 60px;
  overflow: hidden;
  background-color: #fff;
  background-image: url("../img/mfp_reset.gif");
  background-repeat: no-repeat;
  background-position: 0 0;
  border: none;
  border-style: none;
  cursor: pointer;
  text-indent: -5000px;
}

.button-mfp-reset:hover {
  background-position: 0 -60px;
}

/* 確認ボタン */
.button-mfp-goconfirm {
  width: 180px;
  height: 60px;
  overflow: hidden;
  background-color: #fff;
  background-image: url("../img/mfp_goconfirm.gif");
  background-repeat: no-repeat;
  background-position: 0 0;
  border: none;
  border-style: none;
  cursor: pointer;
  text-indent: -5000px;
}

.button-mfp-goconfirm:hover {
  background-position: 0 -60px;
}

.button-mfp-goconfirm:disabled {
  background-position: 0 0;
  cursor: not-allowed;
  /* opacity: 0.6; */
}

/* ==============================================
     レスポンシブ対応 (768px以下)
     ============================================== */

@media (width <= 768px) {
  .mailform {
    margin: 30px auto;
    padding: 20px;
  }

  .mailform th,
  .mailform td {
    display: block; /* ラベルと入力欄を縦積みにする */
    width: 100%;
    padding: 16px 10px;
    box-sizing: border-box;
  }

  .mailform th {
    padding-bottom: 8px;
    border-bottom: none; /* ラベルと入力欄の間の線を消す */
  }

  .mailform td {
    padding-top: 0;
  }

  .name-input-container {
    flex-direction: column;
    gap: 12px;
  }

  .name-input-group {
    width: 100%;
  }

  .mailform input[name="姓(必須)"],
  .mailform input[name="名(必須)"],
  .mailform input[name="セイ"],
  .mailform input[name="メイ"] {
    width: 100%;
    margin-right: 0;
  }

  .mfp-buttons li {
    display: block;
    margin: 0;
  }

  .mfp-buttons li:first-child {
    margin-bottom: 12px;
  }

  .name-input-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .name-input-row--furigana {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  /* .mfp-buttons input[type="button"] {
    width: 100%;
  } */
}
