table th {
	background-color: lightgreen;
}

/* 登録・編集画面の幅を指定 */
textarea {
	width: 800px;
	height: 200px;
}

.td-style {
	white-space: nowrap;
	/* 改行しない */
	overflow: hidden;
	/* はみ出した部分を隠す */
	text-overflow: ellipsis;
	/* 省略記号「…」を表示 */
	max-width: 150px;
	/* 必要に応じて幅を指定 */
}

/* モーダルの背景 */
.modal-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	/* 初期状態は非表示 */
	justify-content: center;
	align-items: center;
	z-index: 1000;
}

/* モーダル本体 */
.modal-content {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	width: 300px;
	text-align: center;
}


/* 検索モーダル本体 */
.search-modal-content {
	background: #fff;
	padding: 20px;
	border-radius: 8px;
	width: 500px;
	text-align: center;
}

/* モーダルボタン */
.modal-btn {
	margin-top: 15px;
	padding: 8px 16px;
	background-color: #007bff;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	width: 100px;
	height: 35px;
	text-align: center;
}

.close-btn:hover {
	background-color: #0056b3;
}

.radio-and-checkbox-class {
	display: inline-block;
}

.grayed-out {
	background-color: #cccccc;
	/* または lightgray */
}

.page-link {
	display: inline-block;
	border: 1px solid #ccc;
	border-radius: 3px;
	background-color: #fff;
	color: #333;
	text-decoration: none;
}

.page-link.active {
	font-weight: bold;
	background-color: #f0f0f0;
}

.page-link.disabled {
	color: #aaa;
	pointer-events: none;
	border-color: #eee;
	background-color: #fafafa;
}

.pagination-wrapper {
	margin-bottom: 20px;
	/* 今より広めに調整 */
}

#post-table {
	border-collapse: collapse;
	/* 枠線をまとめる */
	border: 1px solid black;
	/* テーブル全体の枠線 */
}

#post-table th,
#post-table td {
	border: 1px solid black;
	/* 各セルの枠線 */
}
.link-style {
	display: flex;
	gap: 12px; /* この行で間隔が空きます */
	flex-wrap: wrap; /* 折り返し可能にしたい場合 */
}

.link-style a {
	text-align: center;
	text-decoration: none;/* リンクの下線をoff */
	padding: 5px 10px;
	background-color: #f0f0f0;
	color: #333;
	border-radius: 6px;/* 角丸 */
}

.ingredient-link {
  display: inline-block;
  padding: 2px 10px;
  margin: 4px 4px 4px 0;
  background-color: #e0f2e9; /* 薄い緑 */
  color: #006644;
  border: 1px solid #b2d8cc;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

.ingredient-link:hover {
  background-color: #cceee0;
  color: #004d33;
  text-decoration: none;
}

.button-style {
  display: inline-block;
  padding: 4px 8px;
  margin: 4px;
  background-color: #f0f0f0;     /* Windows風 */
  color: #000;
  border: 1px solid #888;        /* やや控えめな境界線 */
  border-radius: 6px;            /* ★角丸★ */
  font-size: 14px;
  font-family: "Segoe UI", sans-serif;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.button-style:hover {
  background-color: #e0e0e0;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

.highlight-registered {
	background-color: #dff0d8; /* レシピ登録済みの薄緑色 */
}

.recipe-card {
  background-color: white; /* 通常時の色 */
  transition: background-color 0.3s ease; /* なめらかに変化 */
}

.recipe-card:hover {
  background-color: lightgreen; /* ホバー時の色 */
  cursor: pointer; /* マウスポインタを手に */
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px;
}

.recipe-card {
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  background: #f9f9f9;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

/* レシピ一覧のカードの画像部分 */
.recipe-card img {
  width: 100%;
  height: auto;
}

/* メモ画像 */
.memo-icon {
	padding-right: 30px; /* 画像分の余白 */
	background-image: url('/img/memo.png');
	background-size: 32px 32px; /* 画像の大きさ */
	background-position: right center; /* 右端中央に表示 */
	background-repeat: no-repeat; /* 画像が連続して表示されないように */
}

.recipe-name-container {
    display: inline-flex;
    align-items: center;
    gap: 5px; /* 文字とアイコンの間隔 */
}

.underline {
	text-decoration: underline;
}

#recipe-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}

#recipe-table th, #recipe-table td {
  border: 1px solid #ccc;
  padding: 5px;
}

#recipe-table th:nth-child(3),
#recipe-table td:nth-child(3) {
  width: 30%;
  overflow-wrap: break-word;
  white-space: normal;
}

#recipe-table th:nth-child(4),
#recipe-table td:nth-child(4) {
  width: 40%;
  overflow-wrap: break-word;
  white-space: normal;
}

#recipe-table textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}

#recipe-table th:nth-child(5),
#recipe-table td:nth-child(5) {
  width: 80px; /* 80pxくらい狭めに設定 */
  white-space: nowrap; /* 改行させたくない場合 */
  text-align: center;
  padding: 4px;
}

#recipe-table td:nth-child(5) button {
  padding: 2px 6px;
  font-size: 12px;
  min-width: unset;  /* 幅の指定があれば解除 */
}

.container {
	display: flex;
}

.fixed-col {
	flex-shrink: 0;
}

.fixed-col table {
	border-collapse: collapse;
}

.fixed-col th {
	width: 150px;
}

/* MEMO white-space: nowrap;をとれば、幅は調整できそうだけど、高さが変わると、左の固定列とずれる */
.fixed-col td {
	width: 150px;
	background-color: #dff0d8;
	white-space: nowrap;
}

/* 1列目を固定 */
.scroll-area {
	overflow-x: auto;
}

.scroll-table {
	border-collapse: collapse;
}

.scroll-table th, .scroll-table td {
	width: 100px;
	white-space: nowrap;
}

/** ヘッダーリンク **/
.link-style a.link-active {
	color: #2e7d32;          /* 濃いめの緑だけど少し薄く */
	border-bottom: 2px solid #66bb6a;  /* 薄めの緑でボーダー */
	font-weight: 600;
}

#scrollTopBtn {
  display: none; /* 初期は非表示 */
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 100;
  font-size: 18px;
  padding: 10px 15px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

#scrollTopBtn:hover {
  background-color: #388E3C;
}

/* レシピ画像 */
.recipe-icon {
	display: inline-block;
	width: 32px; /* 幅 */
	height: 32px; /* 高さ */
	background-image: url('/img/recipe.png');
	background-size: contain; /* 画像全体を枠内に収める */
	background-position: center; /* 中央に配置 */
	background-repeat: no-repeat;
	border: 1px solid #333;
	border-radius: 4px;
	cursor: pointer;
	vertical-align: middle;
}

/* PC動画画像 */
.pc-video-icon {
	display: inline-block;
	width: 32px; /* 幅 */
	height: 32px; /* 高さ */
	background-image: url('/img/pc_video.png');
	background-size: contain; /* 画像全体を枠内に収める */
	background-position: center; /* 中央に配置 */
	background-repeat: no-repeat;
	border: 1px solid #333;
	border-radius: 4px;
	cursor: pointer;
	vertical-align: middle;
}

.img-memo-icon {
	border: 1px solid #333;
	border-radius: 4px;
	width: 32px;
	height: 32px;
}

.section-title {
	background-color: #4CAF50; /* 帯の色 */
	color: white; /* 文字色 */
	padding: 5px 10px; /* 上下左右 */
	border-radius: 4px; /* 角を丸くしたい場合 */
	font-size: 15px;
	margin-top: 20px;
}
