@charset "UTF-8";

.calendar-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.calendar-header {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 30px 40px 20px;
  margin-bottom: 20px;
}

.calendar-title {
  font-size: 1.8em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 10px 0;
}

.calendar-note {
  color: #888;
  font-size: 0.88em;
  margin: 0;
}

/* 月ナビゲーション */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
}

.month-title {
  font-size: 1.4em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
  min-width: 160px;
  text-align: center;
}

.month-nav-btn {
  display: inline-block;
  padding: 8px 20px;
  background: #3498db;
  color: white;
  border-radius: 20px;
  text-decoration: none;
  font-size: 0.9em;
  transition: background 0.2s;
}

.month-nav-btn:hover {
  background: #2176ae;
}

/* カレンダーグリッド */
.cal-grid-wrapper {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  overflow: hidden;
  margin-bottom: 16px;
}

.cal-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.cal-weekday {
  padding: 10px 4px;
  text-align: center;
  font-size: 0.85em;
  font-weight: 600;
  color: #555;
  background: #f0f4f8;
  border-bottom: 2px solid #dde;
}

.cal-weekday.weekend {
  color: #c0392b;
}

.cal-cell {
  vertical-align: top;
  border: 1px solid #eee;
  padding: 6px 4px 4px;
  height: 90px;
  position: relative;
}

.cal-cell.other-month {
  background: #fafafa;
}

.cal-cell.today {
  background: #eaf4ff;
}

.cal-day-num {
  font-size: 0.85em;
  font-weight: 600;
  color: #444;
  margin-bottom: 3px;
}

.cal-day-num.weekend {
  color: #c0392b;
}

.cal-cell.today .cal-day-num {
  background: #3498db;
  color: white;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8em;
}

.cal-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cal-event {
  display: block;
  font-size: 0.7em;
  padding: 2px 5px;
  border-radius: 3px;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: white;
  line-height: 1.4;
}

.cal-event.freq-monthly   { background: #3498db; }
.cal-event.freq-quarterly { background: #27ae60; }
.cal-event.freq-annual    { background: #9b59b6; }
.cal-event.freq-daily     { background: #95a5a6; }

.cal-event:hover {
  opacity: 0.85;
}

/* 凡例 */
.cal-legend {
  display: flex;
  gap: 20px;
  justify-content: flex-end;
  margin-bottom: 24px;
  font-size: 0.85em;
  color: #666;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

.legend-dot.freq-monthly   { background: #3498db; }
.legend-dot.freq-quarterly { background: #27ae60; }
.legend-dot.freq-annual    { background: #9b59b6; }

/* リスト表示 */
.schedule-list-section {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 30px 40px;
}

.section-heading {
  font-size: 1.3em;
  font-weight: 700;
  color: #2c3e50;
  margin: 0 0 20px 0;
  padding-bottom: 10px;
  border-bottom: 2px solid #3498db;
}

.schedule-day-block {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: flex-start;
}

.schedule-day-block:last-child {
  border-bottom: none;
}

.schedule-date {
  font-size: 0.9em;
  font-weight: 600;
  color: #555;
  min-width: 130px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.today-badge {
  background: #3498db;
  color: white;
  font-size: 0.75em;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.schedule-entries {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.schedule-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: #2c3e50;
  font-size: 0.9em;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
  background: #fafafa;
  transition: all 0.15s;
}

.schedule-entry:hover {
  border-color: #3498db;
  background: #eaf4ff;
  color: #2176ae;
}

.entry-freq-badge {
  font-size: 0.75em;
  padding: 1px 6px;
  border-radius: 10px;
  color: white;
  font-weight: 500;
}

.schedule-entry.freq-monthly   .entry-freq-badge { background: #3498db; }
.schedule-entry.freq-quarterly .entry-freq-badge { background: #27ae60; }
.schedule-entry.freq-annual    .entry-freq-badge { background: #9b59b6; }

.confirmed-badge {
  font-size: 0.75em;
  color: #27ae60;
  font-weight: 600;
}

.no-schedule {
  color: #999;
  text-align: center;
  padding: 30px;
}

/* レスポンシブ */
@media screen and (max-width: 768px) {
  .calendar-container {
    padding: 10px;
  }

  .calendar-header {
    padding: 20px;
  }

  .cal-cell {
    height: 70px;
    padding: 4px 2px;
  }

  .cal-event {
    font-size: 0.62em;
  }

  .schedule-list-section {
    padding: 20px;
  }

  .schedule-day-block {
    flex-direction: column;
    gap: 8px;
  }
}

@media screen and (max-width: 480px) {
  .cal-grid-wrapper {
    overflow-x: auto;
  }

  .cal-grid {
    min-width: 480px;
  }
}
