/* =========================================================
   OneHeart ユーザーフォーム スタイル 完全版
   ---------------------------------------------------------
   2025-11 修正版：構文エラー修正＋白枠復活＋続柄欄短縮対応
   ========================================================= */

/* 全体枠 */
.oneheart-form {
  max-width: 1000px;
  margin: 20px auto;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-family: "Yu Gothic", sans-serif;
}

/* タブボタン */
.oh-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 2px solid #01acb2;
  margin-bottom: 20px;
}

.oh-tab {
  background: #f5f5f5;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  transition: 0.3s;
  font-weight: bold;
  color: #555;
}

.oh-tab.active {
  background: #01acb2;
  color: #fff;
  border-radius: 8px 8px 0 0;
}

.oh-tab:hover {
  background: #00969b;
  color: #fff;
}

/* タブコンテンツ表示制御 */
.oh-tab-content {
  display: none;
  margin-top: 20px;
}

.oh-tab-content.active {
  display: block;
}

/* グリッド配置 */
.oh-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px 20px;
  align-items: center;
}

label {
  font-weight: bold;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
}

textarea {
  min-height: 80px;
}

/* ボタン */
.btn-submit {
  padding: 10px 20px;
  background: #01acb2;
  color: #fff;
  font-weight: bold;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-submit:hover {
  background: #00969b;
}

.btn-clear {
  padding: 10px 20px;
  background: #eee;
  color: #333;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-left: 10px;
}

.btn-clear:hover {
  background: #ccc;
}

/* ボタン位置 */
.oh-submit-top,
.oh-submit-bottom {
  text-align: right;
  margin: 10px 0;
}

/* メッセージ */
.oh-message {
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 6px;
}

.oh-message.success {
  background: #e0f7e9;
  color: #0a5c2e;
}

.oh-message.error {
  background: #fde0e0;
  color: #9e1c1c;
}

/* セクション見出し */
.oh-section-title {
  grid-column: 1 / -1;
  font-weight: bold;
  font-size: 16px;
  color: #01acb2;
  padding: 5px 0;
  border-bottom: 2px solid #01acb2;
  margin: 10px 0;
}

/* チェックボックス */
.oh-checkbox-only {
  display: flex;
  align-items: center;
  padding: 4px 0;
}

.oh-grid input[type="checkbox"] {
  width: auto;
  height: 18px;
}

.oh-checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.oh-checkbox-group label {
  font-weight: normal;
  font-size: 14px;
}

/* 家族グリッド */
.oh-grid-family {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 20px;
}

/* 続柄欄を短くする（保護者＋家族共通） */
input[name="guardian1_relation"],
input[name="guardian2_relation"],
input[name="family1_relation"],
input[name="family2_relation"],
input[name="family3_relation"],
input[name="family4_relation"] {
  width: 6em;
  min-width: 80px;
}

/* タブボタンのホバーやアクティブを滑らかに */
.oh-tab,
.btn-submit,
.btn-clear {
  transition: all 0.2s ease;
}

/* スマホ調整 */
@media (max-width: 768px) {
  .oh-grid {
    grid-template-columns: 1fr;
  }

  .btn-submit,
  .btn-clear {
    width: 100%;
    margin: 5px 0;
  }

  .oh-tabs {
    overflow-x: auto;
  }
}


/* 健康・生活セクション：セレクト＋テキストエリア横並び */
.oh-grid-inline {
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: flex-start;
}

.oh-grid-inline select {
  flex: 0 0 140px;
}

.oh-grid-inline textarea {
  flex: 1;
  min-height: 60px;
  resize: vertical;
}