/* 離乳食サポートアプリ - カスタムCSS */

/* ナビゲーションリンク */
.nav-link {
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background-color 0.2s;
}
.nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
}
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.25);
}

.mobile-nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: background-color 0.2s;
}
.mobile-nav-link:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* 機能カード */
.feature-card {
  display: block;
  background: white;
  padding: 1.5rem;
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* スケジュールテーブル */
.schedule-table {
  width: 100%;
  border-collapse: collapse;
}
.schedule-table th {
  background: #FAFAFA;
  padding: 0.75rem 0.5rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.8125rem;
  color: #5D4037;
  border-bottom: 2px solid #E0E0E0;
}
.schedule-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid #F0F0F0;
  font-size: 0.8125rem;
}
.schedule-table tr:hover {
  background: #FFF8E1;
}
.schedule-table .day-cell {
  font-weight: 700;
  text-align: center;
  color: #5D4037;
  white-space: nowrap;
}
.schedule-table .memo-cell {
  color: #757575;
  font-size: 0.75rem;
}
.schedule-table .meal-label {
  font-size: 0.6875rem;
  color: #8D6E63;
  font-weight: 600;
}

/* 代替マーク */
.substituted-cell {
  background: #E8F5E9;
  box-shadow: inset 0 0 0 1px #C8E6C9;
}
.substitute-badge {
  display: inline-block;
  font-size: 0.6875rem;
  padding: 0.125rem 0.375rem;
  border-radius: 9999px;
  background: #2E7D32;
  color: white;
  margin-right: 0.25rem;
  vertical-align: middle;
}
.new-mark {
  color: #FF9800;
  font-weight: 700;
}
.caution-mark {
  color: #F44336;
  font-weight: 700;
}

/* レスポンシブテーブル */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.schedule-table th,
.schedule-table td {
  min-width: 5rem;
}
.schedule-table th:first-child,
.schedule-table td.day-cell {
  min-width: 3.5rem;
}
.schedule-table .meal-label {
  min-width: 2.5rem;
}

/* スマホ: スクロールヒント */
.table-scroll-hint {
  display: none;
  text-align: right;
  font-size: 0.6875rem;
  color: #9E9E9E;
  padding: 0.25rem 0.75rem;
}
@media (max-width: 640px) {
  .table-scroll-hint {
    display: block;
  }
}

/* 調理カード */
.cooking-card {
  background: white;
  border: 1px solid #E0E0E0;
  border-radius: 1rem;
  overflow: hidden;
}
.cooking-card-header {
  padding: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s;
}
.cooking-card-header:hover {
  background: #FAFAFA;
}
.cooking-card-body {
  padding: 0 1rem 1rem;
}

/* チャット */
.chat-message {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  margin-bottom: 0.75rem;
  line-height: 1.6;
  font-size: 0.875rem;
}
.chat-message.user {
  background: #5D4037;
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 0.25rem;
}
.chat-message.assistant {
  background: white;
  color: #3E2723;
  border: 1px solid #E0E0E0;
  border-bottom-left-radius: 0.25rem;
}

/* セレクトボックス */
.form-select {
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  border: 1px solid #D7CCC8;
  border-radius: 0.5rem;
  background-color: white;
  font-size: 0.875rem;
  color: #5D4037;
  appearance: auto;
}
.form-select:focus {
  outline: none;
  border-color: #8D6E63;
  box-shadow: 0 0 0 2px rgba(141, 110, 99, 0.2);
}

/* チェックボックスグループ */
.checkbox-group label {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: white;
  border: 1px solid #D7CCC8;
  border-radius: 9999px;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: all 0.2s;
}
.checkbox-group label:hover {
  border-color: #8D6E63;
}
.checkbox-group input[type="checkbox"]:checked + span {
  color: #5D4037;
  font-weight: 600;
}
.checkbox-group label:has(input:checked) {
  background: #FFECB3;
  border-color: #FFA000;
}

/* 固さ参考画像 */
.texture-img {
  transition: transform 0.2s;
  cursor: pointer;
}
.texture-img:hover {
  transform: scale(1.03);
}

/* 画像モーダル */
#image-modal {
  backdrop-filter: blur(4px);
}
