/* ────────────────────────────── */
/* カルテ編集フォーム 全体 */
.karte-frontend-edit-wrapper {
  background: #f9f9f9;
  border: 1px solid #ddd;
  padding: 20px;
  margin: 30px 0;
  border-radius: 4px;
}

/* 見出し */
.category-dog-post h1,
.category-cat-post h1 {
  display: none;
}

.karte-frontend-edit-wrapper h4 {
  margin-top: 0;
  padding-bottom: 5px;
  border-bottom: 1px solid #ccc;
  font-size: 1.2em;
  color: #333;
}

/* 各フィールド */
.karte-frontend-edit-wrapper p {
  margin-bottom: 1em;
}
.karte-frontend-edit-wrapper input[type="text"],
.karte-frontend-edit-wrapper input[type="date"],
.karte-frontend-edit-wrapper textarea {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-size: 1em;
}

/* ラジオ・チェック */
.karte-frontend-edit-wrapper label {
  font-weight: normal;
}
.karte-frontend-edit-wrapper input[type="radio"],
.karte-frontend-edit-wrapper input[type="checkbox"] {
  margin-right: 6px;
}

/* 診察履歴テーブル */
.karte-frontend-edit-wrapper .records-wrapper {
  max-height: 300px;       /* 好みの高さに調整 */
  overflow-y: auto;
  border: 1px solid #ddd;
  padding: 5px;
  margin-bottom: 1em;
}
.karte-frontend-edit-wrapper #records-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1em;
}
.karte-frontend-edit-wrapper #records-table th,
.karte-frontend-edit-wrapper #records-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}
.karte-frontend-edit-wrapper #records-table th {
  background: #f0f0f0;
}
.karte-frontend-edit-wrapper .button.remove-row {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.karte-frontend-edit-wrapper #add-record {
  background: #3498db;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
}
.karte-frontend-edit-wrapper textarea {
  min-height: 200px;
  max-width: 100%;
  width: 100%;
}

/* 更新ボタン */
.karte-frontend-edit-wrapper button[type="submit"] {
  background: #2ecc71;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 4px;
  cursor: pointer;
}
.karte-frontend-edit-wrapper button[type="submit"]:hover {
  background: #27ae60;
}

.category-dog-post footer,
.category-cat-post footer {
  display: none;
}

/* ──────────────────────────────
   新規追加フォーム デザイン調整
──────────────────────────────── */

/* フォーム全体 */
.karte-add-form {
  background: #fff;
  border: 1px solid #ddd;
  padding: 20px;
  margin: 30px 0;
  border-radius: 4px;
}

/* セクション見出し */
.karte-add-form h4 {
  font-size: 1.2em;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  padding-bottom: 5px;
  border-bottom: 1px solid #ccc;
  color: #333;
}

/* 入力フィールド */
.karte-add-form p {
  margin-bottom: 1em;
}
.karte-add-form input[type="text"],
.karte-add-form input[type="date"],
.karte-add-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 1em;
  border: 1px solid #ccc;
  border-radius: 2px;
  background: #fafafa;
}

/* ラジオ・チェックボックス */
.karte-add-form label {
  margin-right: 1.5em;
  font-weight: normal;
}
.karte-add-form input[type="radio"],
.karte-add-form input[type="checkbox"] {
  margin-right: 6px;
  vertical-align: middle;
}

/* 診察履歴テーブル */
.karte-add-form .records-wrapper {
  margin-bottom: 1em;
}
.karte-add-form #records-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0.5em;
}
.karte-add-form #records-table th,
.karte-add-form #records-table td {
  border: 1px solid #ddd;
  padding: 8px;
  vertical-align: middle;
}
.karte-add-form #records-table th {
  background: #f0f0f0;
  text-align: left;
}
.karte-add-form .button.remove-row {
  background: #e74c3c;
  color: #fff;
  border: none;
  padding: 4px 8px;
  border-radius: 2px;
  cursor: pointer;
}
.karte-add-form #add-record {
  background: #3498db;
  color: #fff;
  border: none;
  padding: 6px 12px;
  border-radius: 2px;
  cursor: pointer;
}

/* 更新／追加ボタン */
.karte-add-form button[type="submit"] {
  background: #0085ba;
  color: #fff;
  border: none;
  padding: 10px 20px;
  font-size: 1em;
  border-radius: 3px;
  cursor: pointer;
  margin-top: 1em;
}
.karte-add-form button[type="submit"]:hover {
  background: #0073a8;
}

/* モバイル対応 */
@media screen and (max-width: 600px) {
  .karte-add-form {
    padding: 15px;
  }
  .karte-add-form h4 {
    font-size: 1.1em;
  }
  .karte-add-form input,
  .karte-add-form textarea {
    font-size: 0.9em;
  }
}
