@charset "UTF-8";

/* コンテンツ幅の調整 */
.entry-content, main {
  max-width: 1000px;
  margin: 0 auto;
}

/* ====================================
   1. タブ切り替えのデザイン
   ==================================== */
.tab_wrap {
  display: flex;
  flex-wrap: wrap;
  margin-top: 20px;
}

/* ラベル（ボタン部分） */
.tab_label {
  color: #666;
  background: #eee;
  padding: 15px 0;
  width: 50%; /* 2つ並べるので50% */
  text-align: center;
  font-weight: bold;
  cursor: pointer;
  order: -1; /* 表示順序を先頭に */
  border-bottom: 3px solid transparent;
  transition: all 0.3s;
}

/* 選択されたタブのデザイン */
/* 自動整形でbrやpが入っても効くようにセレクタを強化 */
input[name="tab_btn"]:checked + .tab_label,
input[name="tab_btn"]:checked + br + .tab_label,
input[name="tab_btn"]:checked + p + .tab_label {
  color: #fff;
  background: #333; /* 選択時の色 */
  border-bottom: 3px solid #cc0000;
}

/* ラジオボタン自体は非表示 */
input[name="tab_btn"] {
  display: none;
}

/* WordPressの自動整形タグ対策 */
.tab_wrap br { display: none; }
.tab_wrap p { display: contents; }

/* コンテンツエリア（フォーム表示部分） */
.tab_content {
  width: 100%;
  padding: 30px 0;
  order: 1; /* ボタンの下に表示 */
}


/* ====================================
   2. フォーム本体のデザイン
   ==================================== */
/* テーブル全体 */
table.houjin-form {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
  border-top: 2px solid #ccc;
  border-bottom: 2px solid #ccc;
  font-size: 15px;
  margin-bottom: 30px;
}

/* 行（tr） */
table.houjin-form tr {
  border-bottom: 1px solid #ddd;
}

/* 左側の見出し（th） */
table.houjin-form th {
  background: #f5f5f5; /* 薄いグレー */
  width: 30%;
  text-align: left;
  vertical-align: middle;
  padding: 1.5rem 1rem;
  font-weight: bold;
}

/* 必須マーク */
table.houjin-form th div {
  display: inline-block;
  font-size: 11px;
  color: #fff;
  background: #cc0000; /* 赤色 */
  padding: 2px 6px;
  margin-left: 5px;
  border-radius: 2px;
  vertical-align: middle;
}

/* 右側の入力欄（td） */
table.houjin-form td {
  background: #fff;
  padding: 1.5rem 1rem;
  vertical-align: middle;
}

/* 入力フィールドの装飾 */
table.houjin-form input[type="text"],
table.houjin-form input[type="email"],
table.houjin-form input[type="tel"],
table.houjin-form textarea {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  box-sizing: border-box; /* 枠からはみ出さない設定 */
  margin: 5px 0;
}

/* 郵便番号入力欄などの調整 */
.post-input {
  width: 120px !important;
  display: inline-block;
  margin-right: 5px;
}

/* 送信ボタンエリア */
.submit-container {
  text-align: center;
  margin: 20px 0 50px;
}

/* 送信ボタン本体 */
input.wpcf7-submit {
  display: block;
  margin: 0 auto;
  background: #333;
  color: #fff;
  border: none;
  padding: 15px 60px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: opacity 0.3s;
}
input.wpcf7-submit:hover {
  opacity: 0.8;
}


/* ====================================
   3. スマホ対応（レスポンシブ）
   ==================================== */
@media screen and (max-width: 768px) {
  /* タブの文字サイズ調整 */
  .tab_label {
    font-size: 14px;
    padding: 12px 0;
  }

  /* フォームを縦並びに */
  table.houjin-form tr {
    display: block;
    border-bottom: none;
    margin-bottom: 20px;
  }
  
  table.houjin-form th {
    display: block;
    width: 100%;
    background: #f5f5f5;
    padding: 10px;
    border-top: 1px solid #ccc;
    box-sizing: border-box;
  }
  
  table.houjin-form td {
    display: block;
    width: 100%;
    padding: 15px 10px;
    border-bottom: 1px solid #ccc;
    box-sizing: border-box;
  }
}


/* ==========================
   送信完了メッセージ装飾
========================== */

/* 共通（まず箱を大きく） */
.wpcf7 form .wpcf7-response-output{
  margin: 30px auto !important;
  padding: 30px 20px !important;
  max-width: 800px;
  text-align: center;
  font-size: 20px;
  font-weight: bold;
  line-height: 1.8;
  border-radius: 8px;
}

/* 成功 */
.wpcf7 form.sent .wpcf7-response-output{
  background: #001aff;
  border: 3px solid #000f91;
  color: #ffffff;
}

/* 入力エラー */
.wpcf7 form.invalid .wpcf7-response-output{
  background: #ff0000;
  border: 3px solid #cc0000;
  color: #ffffff;
}

/* 送信失敗（サーバ等） */
.wpcf7 form.failed .wpcf7-response-output{
  background: #ffe3e3;
  border: 3px solid #cc0000;
  color: #cc0000;
}
