/* ==============================
   モーダル表示専用スタイル
   ============================== */
.modal-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-container {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 500px;
}

/* recordモデル以外専用スタイル */
.no-record-modal-container {
  background: #fff;
  padding: 1.5rem;
  border-radius: 8px;
  width: 90%;
  max-width: 1100px;
  overflow-y: auto;
}

/* モーダル内「閉じる」ボタン */
.modal-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.modal-actions .modal-close {
  display: inline-block;
  padding: 8px 16px;
  background-color: #4CAF50;
  color: #fff;
  border-radius: 4px;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  text-align: center;
  transition: background-color 0.2s;
}

.modal-actions .modal-close:hover {
  background-color: #45a049;
}

/* ==============================
   スマホ専用スタイル
   ============================== */
/* スマホ専用モーダル（背景） */
.mobile-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 999;
}

/* モーダル本体：下部固定、横幅100% */
.mobile-modal-content {
  position: fixed;
  bottom: 60px;
  left: 0;
  width: 100%;
  background: #fff;
  border-radius: 16px 16px 0 0;
  padding: 16px;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

/* ヘッダー */
.mobile-modal-header {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px;
  margin-bottom: 20px;
}

/* recordモーダル内のアイコン＋テキスト表示 */
.mobile-record-modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: flex-start;
}

/* menuモーダル内のアイコン＋テキスト表示 */
.mobile-menu-modal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

.mobile-modal-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  width: calc((100% - 16px * 4) / 5);
  cursor: pointer;
}

.mobile-modal-item:nth-child(n+10) {
  margin-left: 0;
}

.mobile-modal-item-icon {
  width: 48px;
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
  font-size: 24px;
  color: #fff;
  margin-bottom: 4px;
}

/* アイコンごとの背景色 */
.mobile-modal-feed {
  background-color: #ff6b81;
}

.mobile-modal-diaper {
  background-color: #facc15;
}

.mobile-modal-bottle {
  background-color: #60a5fa;
}

.mobile-modal-hydration {
  background-color: #38bdf8;
}

.mobile-modal-baby_food {
  background-color: #fb923c;
}

.mobile-modal-sleep_record {
  background-color: #8b5cf6;
}

.mobile-modal-bath {
  background-color: #38bdf8;
}

.mobile-modal-temperature {
  background-color: #ef4444;
}

.mobile-modal-vaccination {
  background-color: #22c55e;
}

.mobile-modal-schedule {
  background-color: #f97316;
}

.mobile-modal-growth {
  background-color: #10b981;
}

.mobile-modal-diary {
  background-color: #8b5cf6;
}

.mobile-modal-child {
  background-color: #f472b6;
}

.mobile-modal-analysis {
  background-color: #06b6d4;
}

.mobile-modal-tips {
  background-color: #fbbf24;
}

.mobile-modal-notification {
  background-color: #22d3ee;
}

.mobile-modal-item-text {
  font-size: 13px;
  text-align: center;
  line-height: 1.2;
}

/* ==============================
   モーダル用スタイル
   ============================== */
.sidebar-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 60px;
  z-index: 12;
}

.sidebar-modal.hidden {
  display: none;
}

.sidebar-modal-content {
  background-color: #f9fafb;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  max-height: 90%;
  overflow-y: auto;
  width: 90%;
  max-width: 500px;
  height: 90%;
  max-height: 850px;
  position: relative;
  font-family: 'Inter', 'Noto Sans JP', sans-serif;
}

.notification-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background-color: #fff;
  font-weight: 700;
  font-size: 20px;
  color: #333;
  padding: 10px 12px;
  border-bottom: 1px solid #ddd;
  z-index: 10;
}

.header-close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s;
}

.header-close-btn:hover {
  color: #111827;
}

/* ==============================
   通知設定モーダル
   ============================== */
.notification-setting {
  padding: 16px 18px;
  margin-bottom: 16px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background-color: #fff;
  transition: box-shadow 0.2s;
}

.notification-setting:hover {
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.notification-setting h5 {
  font-size: 19px;
  margin-bottom: 10px;
  color: #111827;
  font-weight: 600;
}

/* ラベル共通 */
.notification-setting label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0;
  font-size: 13px;
  color: #374151;
}

/* 数値・時間入力 */
.notification-number,
.child-goal {
  width: 120px;
  padding: 6px 8px;
  font-size: 15px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  transition: border-color 0.2s;
}

.notification-number:focus,
.child-goal:focus {
  box-shadow: none;
  outline: none;
  border-color: #6fcf97;
}

.notification-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.notification-option span,
.notification-option label-text {
  font-size: 17px;
}

.notification-option select {
  font-size: 15px;
}

.notification-option:hover {
  background-color: #f3f4f6;
  cursor: pointer;
}

/* ==============================
   トグルスイッチスタイル
   ============================== */
/* 入力自体を非表示 */
.notification-switch {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* スイッチ本体 */
.switch-slider {
  display: inline-block;
  width: 42px;
  height: 22px;
  background-color: #d1d5db;
  border-radius: 9999px;
  position: relative;
  vertical-align: middle;
  transition: background-color 0.2s;
  margin-left: 6px;
  cursor: pointer;
}

/* スイッチの丸 */
.switch-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background-color: #fff;
  transition: transform 0.2s;
}

/* チェック時 */
.notification-switch:checked + .switch-slider {
  background-color: #4caf50;
}

.notification-switch:checked + .switch-slider::before {
  transform: translateX(20px);
}

/* モーダルの閉じるボタン */
.sidebar-modal-close {
  position: absolute;
  top: 10px;
  right: 16px;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s;
}

.sidebar-modal-close:hover {
  color: #111827;
}