/* ==========================================
   GYUSHA Web Holiday Calendar Styling (Dark Micro-Widget)
   ========================================== */

/* Calendar Container */
.calendar-container {
  background-color: #111111; /* 高級感のある黒背景 */
  border: 1px solid #2a2a2a; /* 暗いグレーの枠線 */
  border-radius: 4px;
  padding: 4px 6px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 225px;
  box-sizing: border-box;
}

/* Header (Month Navigation) */
.calendar-header h4 {
  font-family: 'Noto Serif JP', 'Georgia', serif;
  font-size: 0.85rem;
  font-weight: 600;
  color: #ffffff; /* 白文字 */
  letter-spacing: 0.02em;
  margin: 0 4px !important;
}

.calendar-header .btn {
  border-radius: 2px;
  font-size: 0.65rem;
  padding: 1px 4px;
  font-weight: 600;
  transition: all 0.2s ease;
  border: 1px solid #444444; /* ボタン枠線を暗く */
  background-color: transparent;
  color: #cccccc; /* 薄いグレーの文字 */
  line-height: 1;
}

.calendar-header .btn:hover:not(:disabled) {
  background-color: #ffffff;
  color: #111111;
  border-color: #ffffff;
}

.calendar-header .btn:disabled {
  opacity: 0.2;
  cursor: not-allowed;
}

/* Grid Layout */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  text-align: center;
}

/* Grid Headers (Sunday - Saturday) */
.calendar-grid-header {
  font-family: 'Noto Serif JP', sans-serif;
  font-weight: bold;
  font-size: 0.65rem;
  color: #888888; /* グレーの曜日表示 */
  padding-bottom: 4px;
  border-bottom: 1px solid #222222;
  margin-bottom: 2px;
}

/* Day Cells */
.calendar-day {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.72rem;
  padding: 3px 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1 / 1;
  color: #dddddd; /* 明るい文字色 */
  user-select: none;
  transition: background-color 0.2s ease;
}

/* Empty cells before start of month */
.calendar-day.empty {
  visibility: hidden;
}

/* Today Indicator */
.calendar-day.today {
  font-weight: bold;
  border: 1px dashed #ffffff; /* 白のダッシュ線 */
}

/* Holiday (Shop Closed) Highlight - High contrast red */
.calendar-day.holiday {
  background-color: #d9383a; /* 黒背景に映える明るめの赤丸 */
  color: #ffffff !important;
  font-weight: bold;
  box-shadow: 0 2px 4px rgba(217, 56, 58, 0.3);
}

/* Weekend Styling */
.calendar-grid-header:nth-child(1),
.calendar-day:nth-child(7n+1) {
  color: #ff6b6b; /* 日曜：明るい赤 */
}

.calendar-grid-header:nth-child(7),
.calendar-day:nth-child(7n) {
  color: #4dabf7; /* 土曜：明るい青 */
}

/* Override weekend color when it is a holiday */
.calendar-day.holiday:nth-child(7n+1),
.calendar-day.holiday:nth-child(7n) {
  color: #ffffff;
}

/* Wrapper & Overlay for Unconfirmed Months */
.calendar-wrapper {
  position: relative;
  min-height: 110px;
}

.calendar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(17, 17, 17, 0.9); /* 黒の半透明オーバーレイ */
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 3px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.overlay-text {
  font-family: 'Noto Serif JP', 'Georgia', serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #ffffff; /* 白文字 */
  border: 1px solid #444444;
  padding: 3px 10px;
  background-color: #222222; /* ダークグレーの背景 */
  border-radius: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Apply opacity reduction when month is unconfirmed */
.calendar-wrapper.unconfirmed .calendar-grid {
  opacity: 0.2;
  filter: grayscale(80%);
  pointer-events: none;
}
