/* ==============================
    Childビュー専用スタイル
   ============================== */
/* タイトルを包む親に中央揃え */
.child-title-wrapper {
  text-align: center;
}

/* ページタイトル */
.child-title {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  font-weight: 700;
  font-size: 24px;
  color: #1f2937;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
  padding-bottom: 0.3rem;
}

.child-form-container {
  max-width: 500px;
  margin: 0 auto;
  padding: 1.5rem;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* 下線アクセント */
.child-title::after {
  content: "";
  position: absolute;
  left: 50%; /* 親要素中央に配置 */
  bottom: 0;
  height: 3px;
  width: 50px;
  background: linear-gradient(90deg, #81c784, #66bb6a);
  transform: translateX(-50%);
}

/* 一覧全体 */
.children-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* 各子供カード */
.child-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 15px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  transition: all 0.2s ease-in-out;
}

.child-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.child-info {
  flex: 1;
}

.child-name {
  font-size: 1.2rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 6px;
}

.child-detail {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.5;
}

.child-detail span {
  color: #888;
}

.child-actions {
  display: flex;
  gap: 10px;
}

.child-btn {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s;
}

.view-btn {
  background-color: #e8f0fe;
  color: #2563eb;
  border: 1px solid #2563eb;
}

.view-btn:hover {
  background-color: #2563eb;
  color: #fff;
}

.edit-btn {
  background-color: #fff3cd;
  color: #b58900;
  border: 1px solid #b58900;
}

.edit-btn:hover {
  background-color: #b58900;
  color: #fff;
}

.delete-btn {
  background-color: #fde2e2;
  color: #d32f2f;
  border: 1px solid #d32f2f;
}

.delete-btn:hover {
  background-color: #d32f2f;
  color: #fff;
}

/* 新規作成ボタン */
.new-child-area {
  text-align: center;
  margin-top: 25px;
}

.new-child-btn {
  display: inline-block;
  padding: 10px 20px;
  margin-top: 20px;
  border: 1px solid #6fcf97;
  border-radius: 6px;
  background-color: #fff;
  color: #4caf50;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.new-child-btn:hover {
  background-color: #6fcf97;
  color: #fff;
}

/* クリック時の押し感 */
.new-child-btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ============================
   子ども詳細ページ（child-show）
   ============================ */
/* コンテナ */
.child-container {
  max-width: 550px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px;
  padding: 35px 30px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.child-container:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

/* 各行 */
.child-container p {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1rem;
  margin: 16px 0;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f3f5;
}

/* ラベル部分 */
.child-container strong {
  color: #555;
  font-weight: 600;
  width: 35%;
}

/* 値部分 */
.child-item {
  color: #111;
  width: 65%;
  text-align: right;
}

/* 写真 */
.child-image {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 25px 0 10px;
}

.child-image img {
  border-radius: 50%;
  width: 200px;
  height: 200px;
  object-fit: cover;
  border: 3px solid #4CAF50;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* アクションボタン */
.child-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 35px;
}

.child-show-btn {
  padding: 8px 16px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  background: #4CAF50;
  color: #fff;
  cursor: pointer;
  text-decoration: none; /* aタグの下線を消す */
  display: inline-block;
}

.child-show-btn:hover {
  background: #45a049;
}

/* ==============================
   switch_child_page 専用スタイル
   ============================== */
/* ページ全体背景グレー */
.switch-child-page-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 69px - 110px - 40px - 41px);
  align-items: center;
}

/* 白背景ボックス */
.switch-child-page-box {
  background-color: #fff;
  border: 1px solid #ddd;
  width: 100%;
  max-width: 500px;
  height: 60vh;
  margin-top: 50px;
  padding: 2rem;
  border-radius: 1.5rem;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

/* 上余白 */
.switch-child-page-top-space {
  height: 3%;
}

/* 子供切り替えビューのデザイン */
.switch-logo-image,
.switch-logo-image-dark {
  height: 70px;
}

/* 通常（ライト） */
.switch-logo-image { display: block; }
.switch-logo-image-dark  { display: none; }

/*. ダークモード時 */
.dark .switch-logo-image { display: none; }
.dark .switch-logo-image-dark  { display: block; }

/* ロゴ */
.switch-child-page-logo span {
  font-size: 2.5rem;
  font-weight: bold;
  color: #111827;
  letter-spacing: 0.05em;
}

/* ロゴとタイトル間隔 */
.switch-child-page-logo-title-space {
  margin-top: 2rem;
}

/* タイトル */
.switch-child-page-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 2rem;
  text-align: center;
}

/* 子どもリスト */
.switch-child-page-children-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* 子ども1人分（form） */
.switch-child-page-children-list form {
  width: 100%;
  margin: 0;
}

/* 子どもボタン */
.switch-child-page-child-item {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  gap: 0.75rem;
  background-color: #fff;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #e5e7eb;
}

.switch-child-page-child-item:hover {
  background-color: #f3f4f6;
}

/* 子どもアイコン */
.switch-child-page-child-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  background-color: #e5e7eb;
  border-radius: 50%;
  padding: 0.3rem;
}

/* 追加ボタンのアイコンだけ変更 */
.switch-child-page-add-child-item .switch-child-page-child-icon {
  background-color: #000;
  border-radius: 50%;
  padding: 0.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 子ども情報 */
.switch-child-page-child-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  min-height: 2rem;
}

/* 名前 */
.switch-child-page-child-name {
  font-weight: 700;
  font-size: 1rem;
  color: #111827;
}

/* 年齢 */
.switch-child-page-child-age {
  font-size: 0.875rem;
  color: #6b7280;
}

/* 追加ボタン全体の高さ */
.switch-child-page-add-child-item {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

/* 「別の子供を追加」の名前だけ通常フォント */
.switch-child-page-add-child-item .switch-child-page-child-name {
  font-weight: 400;
}

/* 子ども未登録時 */
.switch-child-page-no-child {
  color: #6b7280;
  text-align: center;
  margin-top: 0.5rem;
}

/* 下余白 */
.switch-child-page-bottom-space {
  margin-top: auto;
}