/* ===================================
   KALENDER AKADEMIK SECTION
=================================== */
.calendar-area {
  background: #f5f5f5;
}

.calendar-month {
  background: #fff;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
}

.month-header {
  background: linear-gradient(135deg, #7b4397, #dc2430);
  color: #fff;
  text-align: center;
  padding: 12px;
  border-radius: 8px 8px 0 0;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1px;
  margin: -20px -20px 15px -20px;
}

.calendar-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

.calendar-table thead th {
  background: #f0f0f0;
  padding: 8px 4px;
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: #333;
  border: 1px solid #ddd;
}

.calendar-table tbody td {
  padding: 8px 4px;
  text-align: center;
  border: 1px solid #ddd;
  font-size: 13px;
  font-weight: 500;
  min-width: 32px;
  height: 32px;
  vertical-align: middle;
}

.calendar-table tbody td.empty {
  background: #fafafa;
  border-color: #eee;
}

.calendar-table tbody td.weekend {
  background: #ffebee;
  color: #d32f2f;
  font-weight: 600;
}

/* Event Colors */
.calendar-table tbody td.event-pembelajaran {
  background: #66CCCC;
  color: #fff;
  font-weight: 600;
}

.calendar-table tbody td.event-ujian {
  background: #FFCC66;
  color: #333;
  font-weight: 600;
}

.calendar-table tbody td.event-ujian-akhir {
  background: #FF9999;
  color: #fff;
  font-weight: 600;
}

.calendar-table tbody td.event-registrasi {
  background: #996633;
  color: #fff;
  font-weight: 600;
}

.calendar-table tbody td.event-libur {
  background: #FF6666;
  color: #fff;
  font-weight: 600;
}

.calendar-table tbody td.event-wisuda {
  background: #FF99CC;
  color: #fff;
  font-weight: 600;
}

.calendar-note {
  font-size: 11px;
  color: #666;
  font-style: italic;
  padding-top: 8px;
  border-top: 1px dashed #ddd;
  margin-top: 5px;
}

/* Extracted agenda-specific calendar styles (from agenda.html)
   - ensures consistent look between pages that use the academic calendar */
.calendar-navigation {
  background: linear-gradient(135deg, #7b4397, #dc2430);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 20px;
  border-radius: 8px 8px 0 0;
}

.calendar-navigation button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  transition: background 0.2s ease, transform 0.15s ease;
}

.calendar-navigation button:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.calendar-container {
  background: #fff;
  padding: 20px;
  border-radius: 0 0 8px 8px;
}

.calendar-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0;
  margin-bottom: 0;
}

.calendar-day-name {
  text-align: center;
  font-weight: 600;
  font-size: 12px;
  color: #333;
  padding: 8px 4px;
  background: #f0f0f0;
  border: 1px solid #ddd;
}

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

.date-cell,
.calendar-date {
  aspect-ratio: 1 / 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #ddd;
  background: white;
  color: #333;
  border-radius: 4px;
  box-sizing: border-box;
  transition: background 0.2s ease, transform 0.12s ease;
  min-height: 56px;
}

.date-cell.empty,
.calendar-date.empty {
  background: #fafafa;
  border-color: #eee;
  cursor: default;
}

.date-cell.today,
.calendar-date.today {
  border: 2px solid #00A896;
  font-weight: 700;
  background: rgba(0, 168, 150, 0.1);
}

.date-cell.pembelajaran,
.calendar-date.pembelajaran {
  background: #66CCCC;
  color: white;
}

.date-cell.ujian,
.calendar-date.ujian {
  background: #FFCC66;
  color: #333;
}

.date-cell.libur,
.calendar-date.libur {
  background: #FF6666;
  color: white;
}

.date-cell.acara,
.calendar-date.acara {
  background: #FF99CC;
  color: white;
}

.date-cell.registrasi,
.calendar-date.registrasi {
  background: #996633;
  color: white;
}

.date-cell:not(.empty):hover,
.calendar-date:not(.empty):hover {
  background: #f0f0f0;
  transform: translateY(-2px);
}

@media (min-width: 768px) {
  .date-cell,
  .calendar-date {
    min-height: 64px;
  }
}

/* Legend/Keterangan Panel */
.calendar-legend {
  background: #fff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
  border: 2px solid #e0e0e0;
  position: sticky;
  top: 20px;
}

.legend-title {
  color: #7b4397;
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid #7b4397;
}

.legend-list {
  margin-bottom: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.legend-item:hover {
  background: #f5f5f5;
  transform: translateX(5px);
}

.legend-color {
  width: 30px;
  height: 20px;
  border-radius: 4px;
  margin-right: 12px;
  display: inline-block;
  border: 1px solid rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

.legend-text {
  font-size: 13px;
  color: #333;
  font-weight: 500;
}

.event-details {
  padding-top: 20px;
  border-top: 2px solid #e0e0e0;
}

.event-section-title {
  color: #dc2430;
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.event-detail-item {
  background: #f9f9f9;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 12px;
  border-left: 4px solid #17A2B8;
}

.event-detail-item strong {
  color: #333;
  font-size: 13px;
  display: block;
  margin-bottom: 5px;
}

.event-detail-item p {
  margin: 0;
  font-size: 12px;
  color: #555;
  line-height: 1.5;
}

.event-detail-item small {
  color: #777;
  font-size: 11px;
}

/* Responsive */
@media (max-width: 992px) {
  .calendar-legend {
    margin-top: 30px;
    position: relative;
    top: 0;
  }
}

@media (max-width: 768px) {
  .calendar-month {
    margin-bottom: 20px;
  }
  
  .calendar-table tbody td {
    padding: 6px 2px;
    font-size: 11px;
    min-width: 28px;
    height: 28px;
  }
  
  .month-header {
    font-size: 12px;
  }
}
