/* カレンダー基本スタイル */

.calendar {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 10px 0;
}

.calendar-header h3 {
  margin: 0;
  font-size: 1.5rem;
  color: #333;
}

.month-nav {
  background: #4CAF50;
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.3s;
}

.month-nav:hover {
  background: #45a049;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.calendar-day-header {
  text-align: center;
  font-weight: bold;
  padding: 10px;
  background: #f0f0f0;
  border-radius: 5px;
  color: #555;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  background: white;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.calendar-day:hover:not(.empty) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.calendar-day.empty {
  border: none;
  cursor: default;
  background: transparent;
}

.day-number {
  font-size: 1.2rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.day-label {
  font-size: 0.75rem;
  font-weight: bold;
}

/* カレンダーラッパー */
.calendar-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

/* イベントリスト */
.event-list-container {
  background: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.event-list-container h2 {
  color: #4CAF50;
  margin-bottom: 20px;
}

#event-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.event-item {
  padding: 15px;
  border-left: 4px solid #4CAF50;
  background: #f9f9f9;
  border-radius: 5px;
}

.event-date {
  font-weight: bold;
  color: #4CAF50;
  margin-bottom: 5px;
}

.event-title {
  font-weight: bold;
  margin-bottom: 5px;
}

.event-description {
  color: #666;
  font-size: 0.9rem;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .calendar-wrapper {
    grid-template-columns: 1fr;
  }
  
  .calendar {
    padding: 10px;
  }
  
  .calendar-day {
    padding: 5px;
  }
  
  .day-number {
    font-size: 1rem;
  }
  
  .day-label {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .calendar-header h3 {
    font-size: 1.2rem;
  }
  
  .month-nav {
    width: 35px;
    height: 35px;
    font-size: 1.2rem;
  }
}
/* カレンダーの4色スタイル追加 */

/* 営業日（緑色） */
.calendar-day.type-open {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #4CAF50;
}

.calendar-day.type-open .day-number {
  color: #2e7d32;
}

.calendar-day.type-open .day-label {
  color: #4CAF50;
  font-weight: bold;
}

.calendar-day.type-open:hover {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
  box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

/* 定休日（グレー） */
.calendar-day.type-closed {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  border-color: #9e9e9e;
}

.calendar-day.type-closed .day-number {
  color: #616161;
}

.calendar-day.type-closed .day-label {
  color: #757575;
  font-weight: bold;
}

.calendar-day.type-closed:hover {
  background: linear-gradient(135deg, #e0e0e0 0%, #bdbdbd 100%);
  box-shadow: 0 4px 8px rgba(158, 158, 158, 0.3);
}

/* 臨時休業（赤色） */
.calendar-day.type-temporary-closed {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border-color: #f44336;
}

.calendar-day.type-temporary-closed .day-number {
  color: #c62828;
}

.calendar-day.type-temporary-closed .day-label {
  color: #f44336;
  font-weight: bold;
}

.calendar-day.type-temporary-closed:hover {
  background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
  box-shadow: 0 4px 8px rgba(244, 67, 54, 0.3);
}

/* 予約開業日（オレンジ色） */
.calendar-day.type-reservation-only {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-color: #ff9800;
}

.calendar-day.type-reservation-only .day-number {
  color: #e65100;
}

.calendar-day.type-reservation-only .day-label {
  color: #ff9800;
  font-weight: bold;
}

.calendar-day.type-reservation-only:hover {
  background: linear-gradient(135deg, #ffe0b2 0%, #ffcc80 100%);
  box-shadow: 0 4px 8px rgba(255, 152, 0, 0.3);
}

/* 凡例のスタイル */
.calendar-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.legend-color {
  width: 24px;
  height: 24px;
  border-radius: 4px;
  border: 2px solid;
}

.legend-color.open {
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-color: #4CAF50;
}

.legend-color.closed {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  border-color: #9e9e9e;
}

.legend-color.temporary-closed {
  background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
  border-color: #f44336;
}

.legend-color.reservation-only {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  border-color: #ff9800;
}

/* イベントリストの色分け */
.event-item.type-open {
  border-left: 4px solid #4CAF50;
  background: #e8f5e9;
}

.event-item.type-closed {
  border-left: 4px solid #9e9e9e;
  background: #f5f5f5;
}

.event-item.type-temporary-closed {
  border-left: 4px solid #f44336;
  background: #ffebee;
}

.event-item.type-reservation-only {
  border-left: 4px solid #ff9800;
  background: #fff3e0;
}

.event-item.type-open .event-type {
  color: #4CAF50;
  font-weight: bold;
}

.event-item.type-closed .event-type {
  color: #757575;
  font-weight: bold;
}

.event-item.type-temporary-closed .event-type {
  color: #f44336;
  font-weight: bold;
}

.event-item.type-reservation-only .event-type {
  color: #ff9800;
  font-weight: bold;
}

/* 今月のお知らせスタイル */
#event-list {
  line-height: 1.8;
}

#event-list h3 {
  color: #4CAF50;
  border-bottom: 2px solid #4CAF50;
  padding-bottom: 10px;
  margin-top: 20px;
  margin-bottom: 15px;
}

#event-list ul {
  list-style: none;
  padding-left: 0;
}

#event-list ul li {
  padding: 8px 0;
  padding-left: 25px;
  position: relative;
}

#event-list ul li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #4CAF50;
  font-weight: bold;
}

#event-list a {
  color: #4CAF50;
  text-decoration: none;
  font-weight: bold;
}

#event-list a:hover {
  text-decoration: underline;
}

/* レスポンシブ対応 */
@media (max-width: 768px) {
  .calendar-legend {
    gap: 10px;
  }
  
  .legend-item {
    font-size: 0.85rem;
  }
  
  .legend-color {
    width: 20px;
    height: 20px;
  }
}
