/* 画面全体の設定 */
html, body {
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  background-color: #1976d2;
  font-family: Arial, sans-serif;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  min-height: 100vh !important;
  }

.holiday {
  background-color: red !important;
  color: white;
  font-weight: bold;
}


/* タイトル（h1）の設定 */
h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin: 20px 0;
  font-size: 1.2em;
}

h1 img {
  margin-right: 10px;
  width: 40px;
  height: 40px;
  vertical-align: middle;
}

/* メインコンテンツ */
.content {
  flex: 1;
  max-width: 100%;
  margin: auto;
  padding: 20px;
  padding-bottom: 60px; /* フッター分の余白 */
  overflow-x: auto; /* 横スクロールを許可 */
}

/* テーブルの設定 */
table {
  border-collapse: collapse;
  font-size: 14px;
  table-layout: auto;
  min-width: 700px; /* テーブルが狭くなりすぎないように */
}

/* スクロール可能なテーブルコンテナ */
.table-container {
  width: 100%;
  max-height: 80vh; /* 画面に収まる範囲でスクロール */
  overflow: auto;
  position: relative;
}

/* 1行目 (日付) の固定 */
thead tr:first-child th {
  position: sticky;
  top: 0;
  background-color: #eef570 !important;
  z-index: 100;
}

/* 2行目 (スタッフ名など) の固定 */
thead tr:nth-child(2) th {
  position: sticky;
  top: 30px; /* 1行目の高さに合わせて調整。必要に応じて調整 */
  background-color: #eef570 !important;
  z-index: 99;
}

/* 1列目 (時間) の固定 */
table th:first-child,
table td:first-child {
  position: sticky;
  left: 0;
  background-color: #eef570 !important;
  z-index: 150;
}

/* フッターの上に余白を確保 */
.content {
  padding-bottom: 80px;
}

/* 各セルのデザイン */
table th, table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: center;
  white-space: nowrap;
}

/* 「空きあり」のセルのデザイン */
.clickable {
  background-color: #1976d2;
  color: #192ade;
  cursor: pointer;
  font-weight: bold;
}

.clickable:hover {
  background-color: #c8e5bc;
  text-decoration: underline;
}

/* エラーメッセージ */
.error-message {
  color: red;
  text-align: center;
  font-weight: bold;
}

/* フッターの固定 */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #333;
  color: #f8f8f8;
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 60px;
  z-index: 1000;
  padding: 10px 0;
}

/* フッター内のリンク */
footer a {
  color: #f8f8f8;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.9em;
}

footer a:hover {
  color: #ffeb3b;
}

/* フッターのアイコン */
footer a img {
  width: 24px;
  height: 24px;
}

/* ポップアップの背景（モーダル） */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* 背景を暗くする */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* ポップアップの内容 */
.popup-content {
  background: white;
  padding: 20px;
  border-radius: 10px;
  width: 80%;
  max-width: 500px; /* 最大幅を制限 */
  text-align: center;
  position: relative;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease-in-out;
}

/* 画像のスタイル */
#announcementImage {
  max-width: 100%;
  max-height: 70vh; /* 画面の高さに応じて縮小 */
  height: auto;
  margin-top: 10px;
  border-radius: 5px;
  display: block;
}

/* 閉じるボタン */
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  font-weight: bold;
  color: #ff4d4d;
  cursor: pointer;
  transition: color 0.2s ease-in-out;
}

.close-btn:hover {
  color: #d40000;
}

/* フェードインアニメーション */
@keyframes fadeIn {
  from {
      opacity: 0;
      transform: translateY(-10px);
  }
  to {
      opacity: 1;
      transform: translateY(0);
  }
}


/* スマホ向け調整 */
@media (max-width: 600px) {
  .table-container {
    overflow-x: auto; /* スマホでも横スクロール可能にする */
  }

  html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
  }

  h1 {
    font-size: 1em;
  }

  .content {
    flex: 1;
    max-width: 800px;
    margin: auto;
    padding: 20px;
    overflow: auto;
    padding-bottom: 80px;
  }

  footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: #f8f8f8;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 45px;
    z-index: 1000;
    padding: 10px 0;
  }

  footer a {
    font-size: clamp(0.6em, 2vw, 0.8em);
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
  }

  footer a img {
    width: clamp(15px, 4vw, 20px);
    height: clamp(15px, 4vw, 20px);
  }
}
/* === index.html 専用スタイル === */
.index-page h1 {
  margin-top: 20px;
  font-size: 2.2em;
}

.index-page form {
  max-width: 400px;
  margin: 0 auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.index-page label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  text-align: left;
}

.index-page input {
  width: 95%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.index-page button {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  color: #fff;
  background-color: #007BFF;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.index-page button:hover {
  background-color: #0056b3;
}

.index-page .link {
  margin-top: 10px;
  display: inline-block;
  color: #007BFF;
  text-decoration: none;
  font-size: 16px;
}

.index-page .link:hover {
  text-decoration: underline;
}
/* 中央寄せ用レイアウト */
.centered {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* リンク専用スタイル調整 */
.index-page .link {
  margin-top: 20px;
  color: #007BFF;
  text-decoration: none;
  font-size: 16px;
  text-align: center;
}

.index-page .link:hover {
  text-decoration: underline;
}
/* registerページ専用スタイル */
.register-page.centered {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  min-height: 100vh;
  padding: 40px 16px; /* 👈 左右にも余白を追加 */
  box-sizing: border-box; /* 👈 パディングを含めて幅を計算 */
}

.register-page h1 {
  margin-top: 20px;
  font-size: 2.2em;
  text-align: center;
}

.register-page form {
  max-width: 400px;
  width: 95%;
  margin: 0 auto;
  align-items: center;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.register-page label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  text-align: left;
}

.register-page input {
  width: 95%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.register-page button {
  width: 100%;
  padding: 10px;
  font-size: 16px;
  color: #fff;
  background-color: #007BFF;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.register-page button:hover {
  background-color: #0056b3;
}

.register-page .link {
  margin-top: 10px;
  display: inline-block;
  color: #007BFF;
  text-decoration: none;
  font-size: 16px;
  text-align: center;
}

.register-page .link:hover {
  text-decoration: underline;
}
#announcementContent {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-all;
  white-space: normal;
}

#announcementContent a {
  word-break: break-all;
  color: blue;
  text-decoration: underline;
}
