/* Events Calendar Styles */

/* Calendar Grid */
.calendar-table {
  width: 100%;
  table-layout: fixed;
}

.calendar-table thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  text-align: center;
  padding: 12px 8px;
  border: 1px solid #dee2e6;
}

.calendar-table tbody td {
  vertical-align: top;
  padding: 8px;
  height: 120px;
  min-height: 120px;
  border: 1px solid #dee2e6;
  position: relative;
}

.calendar-day .date-header {
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
  color: #333;
}

.empty-day {
  background-color: #f8f9fa;
}

.past-event {
  color: #999;
}

.today {
  background-color: #e7f3ff;
  border: 2px solid #0d6efd;
}

.today .date-header {
  color: #0d6efd;
  font-weight: 700;
}

.has-events {
  background-color: #e8f5e9;
}

/* Event List in Calendar Cells */
.event-list {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 12px;
}

.event-list li {
  margin-bottom: 4px;
}

.event-list li a {
  color: #0d6efd;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-list li a time {
  color: #666;
  font-size: 11px;
  font-weight: 500;
}

.event-list li a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-list li a:hover span {
  text-decoration: underline;
}

/* Calendar Controls */
.calendar-controls {
  background-color: #0F3864;
  color: white;
  padding: 1rem;
  margin-bottom: 0;
}

.calendar-controls h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  line-height: 1.27;
}

.calendar-nav-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 0.5rem;
  cursor: pointer;
  transition: opacity 0.3s ease;
  min-width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-nav-btn:hover {
  opacity: 0.8;
}

.calendar-nav-btn i {
  display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .calendar-table thead th {
    font-size: 12px;
    padding: 8px 4px;
  }

  .calendar-table tbody td {
    height: 80px;
    min-height: 80px;
    padding: 4px;
  }

  .calendar-day .date-header {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .event-list {
    font-size: 10px;
  }

  .event-list li {
    margin-bottom: 2px;
  }

  .calendar-controls {
    padding: 0.75rem 1rem;
  }

  .calendar-controls h2 {
    font-size: 1rem;
  }

  .calendar-nav-btn {
    font-size: 1.25rem;
    padding: 0.25rem;
  }
}

@media (max-width: 576px) {
  /* Hide day names on very small screens, show abbreviations */
  .calendar-table thead th {
    font-size: 10px;
    padding: 6px 2px;
  }

  .calendar-table tbody td {
    height: 60px;
    min-height: 60px;
    padding: 2px;
  }

  .calendar-day .date-header {
    font-size: 10px;
    margin-bottom: 2px;
  }

  /* Limit to 2 events visible on mobile */
  .event-list li:nth-child(n+3) {
    display: none;
  }

  .event-list li a {
    font-size: 9px;
  }
}
