/* 00base.css - 共通カレンダー基本スタイル */

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #f8f8f8;
  margin: 0;
  padding: 0;
  color: #333;
}

/* カレンダー全体 */
#calendar {
  width: 100%;       /* 画面幅いっぱいに */
  max-width: 100%;   /* 最大幅も制限 */
  box-sizing: border-box;
  margin: 20px auto;
  background: #ccc;
  display: flex;
  flex-direction: column;  /* 縦に週ごと並べる */
  gap: 1px;
}

/* 曜日ヘッダー */
.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

/* 曜日セル */
.weekday-header {
  background: #eee;
  text-align: center;
  padding: 8px 0;
  height: 20px;       /* ヘッダーの高さ */
  line-height: 20px;  /* テキストを中央に揃える */
}

/* 週ごと */
.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  position: relative;  /* 追加 */
  min-height: 80px;
}


/* 土日用 */
.weekday-header.sun { color: rgb(167, 59, 59); }
.weekday-header.sat { color: rgb(59, 59, 136); }

/* 日付セル */
.day {
  background: #fff;
  /* min-height: 80px;*/
  padding: 2px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 80px;        /* セル高さ確保 */
  box-sizing: border-box;  /* padding 含めてサイズ調整 */
}

/* 日付ラベル */
.date-label-wrapper {
  display: flex;
  justify-content: flex-start; /* 左寄せ */
  align-items: flex-start; /* 上に寄せる */
  gap: 2px; /* 要素の間に少し余白 */
  font-size: 13px;
  margin-bottom: 0;
}

/* 日付数字 */
.date-number {
  font-weight: bold;
  line-height: 1;   /* 数字の上下余白を最小化 */
}

/* 祝日ラベル */
.holiday-label {
  color:   #d9534f;
  font-size: 11px;
  font-weight: bold;
}


/* 今日の日付 */
.day.today {
  background-color: #56b7d49a !important; /* 水色背景 */
  border: 2px solid #098085; /* 青枠 */
  border-radius: 4px;        /* 角丸 */
  position: relative;
}

/* 今日ラベル */
.today-label {
  font-size: 11px;
  color: #09152c; /* 青色 */
  font-weight: bold;
  background: none;   /* 背景を完全に消す */
  padding: 0;
  border-radius: 0;
}

/* 土日セル */
.day.sun { background: #ffe6e6; }
.day.sat { background: #e6f0ff; }
.day.holiday { background: #ffe6e6; }







/* イベント */
.event {
  font-size: 14px;
  font-family: 'Playfair Display', serif;
  margin: 1px 0;
  padding: 2px 4px;
  border-radius: 5px;
  color: #fff;
  text-shadow: 1px 1px 2px #000;
  background: rgba(0,0,0,0.6);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  line-height: 1.4em;
}

/* 複数日イベント用の帯 */
.event-bar {
  top: 1px;  /* ← 今より小さくする（例えば 12px とか） */
  position: absolute;
  height: 20px;
  border-radius: 4px;
  background-color: rgba(255, 165, 0, 0.7); /* オレンジ半透明 */
  color: #fff;
  font-size: 12px;
  padding-left: 4px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}


/* 年月ヘッダー */
.calendar-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10px auto;
  max-width: 900px;
  gap: 10px;
}

#monthYear {
  font-size: 20px;
  font-weight: bold;
}

/* 前月・翌月ボタン */
#prevMonth, #nextMonth {
  padding: 4px 8px;
  border: none;
  background: #333;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
}

#prevMonth:hover, #nextMonth:hover {
  background: #555555d3;
}

/* ポップアップ */
#popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border: 1px solid #ccc;
  padding: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  text-align: center;
  width: 50vw;
  max-width: 600px;
  max-height: 80%;
  overflow: auto;
  border-radius: 8px;
}

#popup-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

#overlay {
  display: none;
  position: fixed;
  top:0;
  left:0;
  width:100vw;
  height:100vh;
  background: rgba(0,0,0,0.3);
  z-index: 999;
}



