.course-calendar-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.calendar-container {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.calendar-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-weight: 600;
    font-size: 14px;
    color: #191d20;
}

.filter-group select {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    min-width: 180px;
    font-size: 14px;
}

.calendar-filters .btn {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

#apply-filters {
    background: #6be1b2;
    color: #191d20;
}

#apply-filters:hover {
    background: #5ad1a2;
}

#reset-filters {
    background: #f5f5f5;
    color: #191d20;
}

#reset-filters:hover {
    background: #e0e0e0;
}

#fullcalendar {
    margin-bottom: 40px;
}

/* Custom event display in calendar cells */
.fc-daygrid-day-events {
    margin-top: 2px !important;
}

.fc-event {
    cursor: pointer;
    font-weight: 700;
    border: none !important;
    padding: 2px 4px !important;
    margin: 1px 2px !important;
    font-size: 10px !important;
    border-radius: 3px !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

.fc-event:hover {
    opacity: 0.8;
    transform: scale(1.05);
}

.fc-event-title {
    font-weight: 700 !important;
    color: #fff !important;
}

/* Make day cells taller to accommodate multiple events */
.fc-daygrid-day-frame {
    min-height: 80px !important;
}

/* Course Reference Key */
.course-key {
    background: #f9f9fb;
    border-radius: 8px;
    padding: 30px;
    margin-top: 40px;
}

.course-key h2 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #191d20;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

.course-key-section {
    margin-bottom: 30px;
}

.course-key-section:last-child {
    margin-bottom: 0;
}

.course-key-section h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.course-key-section h3::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 4px;
    background: currentColor;
}

.course-key-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
    padding-left: 30px;
}

.course-key-item {
    font-size: 14px;
    line-height: 1.6;
}

.course-key-item strong {
    font-weight: 700;
    color: #191d20;
    font-family: monospace;
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
}

@media (max-width: 768px) {
    .calendar-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group select {
        min-width: 100%;
    }
    
    .course-key-items {
        grid-template-columns: 1fr;
    }
    
    .fc-event {
        font-size: 9px !important;
        padding: 1px 2px !important;
    }
}

/* Force black text on yellow (Practitioner) events */
.fc-event {
    color: #ffffff !important;
}

.fc-event[style*="background-color: rgb(254, 208, 39)"],
.fc-event[style*="background-color:#fed027"],
.fc-event[style*="background-color: #fed027"] {
    color: #000000 !important;
}

.fc-event[style*="background-color: rgb(254, 208, 39)"] .fc-event-title,
.fc-event[style*="background-color:#fed027"] .fc-event-title,
.fc-event[style*="background-color: #fed027"] .fc-event-title {
    color: #000000 !important;
}

/* For list view */
.fc-list-event[style*="rgb(254, 208, 39)"],
.fc-list-event[style*="#fed027"] {
    color: #000000 !important;
}

.fc-list-event-title {
    color: inherit !important;
}


/* Also for list view */
.fc-list-event[style*="#fed027"] .fc-list-event-title,
.fc-list-event[style*="rgb(254, 208, 39)"] .fc-list-event-title {
    color: #000000 !important;
}
/* Force FullCalendar to respect textColor property - HIGHEST SPECIFICITY */
.fc-daygrid-event .fc-event-main,
.fc-daygrid-event .fc-event-title-container,
.fc-daygrid-event .fc-event-title,
.fc-list-event .fc-list-event-title,
.fc-list-event .fc-list-event-dot {
    color: inherit !important;
}

/* Ensure parent event respects the textColor from API */
.fc-event {
    color: var(--fc-event-text-color, #ffffff) !important;
}

.fc-list-event {
    color: var(--fc-list-event-text-color, #000000) !important;
}

/* NUCLEAR CSS - Override everything for yellow events */
.fc-event[style*="254, 208, 39"],
.fc-event[style*="#fed027"],
.fc-event[style*="rgb(254, 208, 39)"] {
    color: #000000 !important;
}

.fc-event[style*="254, 208, 39"] *,
.fc-event[style*="#fed027"] *,
.fc-event[style*="rgb(254, 208, 39)"] * {
    color: #000000 !important;
}

.fc-event[style*="254, 208, 39"] .fc-event-title,
.fc-event[style*="#fed027"] .fc-event-title,
.fc-event[style*="rgb(254, 208, 39)"] .fc-event-title {
    color: #000000 !important;
}

/* ========================================
   DIPLOMA QUICK FILTER BUTTONS
   ======================================== */

.calendar-filters .diploma-quick-filters {
  display: inline-flex;
  gap: 10px;
  margin: 0 15px;
  align-items: center;
}

.calendar-filters .diploma-filter-btn {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 12px 20px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border: 2px solid transparent !important;
  border-radius: 6px !important;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
  line-height: 1.4 !important;
  min-height: auto !important;
}

.calendar-filters .diploma-filter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.calendar-filters .diploma-filter-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1) !important;
}

/* International Diploma Button - Yellow */
.calendar-filters .diploma-filter-btn.international {
  background: #fed027 !important;
  background-color: #fed027 !important;
  color: #000 !important;
}

.calendar-filters .diploma-filter-btn.international:hover {
  background: #e5bb1f !important;
  background-color: #e5bb1f !important;
}

.calendar-filters .diploma-filter-btn.international.active {
  border-color: #000 !important;
  box-shadow: 0 0 0 3px rgba(254, 208, 39, 0.3) !important;
}

/* Advanced Diploma Button - Pink */
.calendar-filters .diploma-filter-btn.advanced {
  background: #ff3f8b !important;
  background-color: #ff3f8b !important;
  color: #fff !important;
}

.calendar-filters .diploma-filter-btn.advanced:hover {
  background: #e6357a !important;
  background-color: #e6357a !important;
}

.calendar-filters .diploma-filter-btn.advanced.active {
  border-color: #fff !important;
  box-shadow: 0 0 0 3px rgba(255, 63, 139, 0.3) !important;
}

/* Icon styling */
.calendar-filters .diploma-filter-btn::before {
  content: "🎓";
  font-size: 18px;
  display: inline-block;
  margin-right: 5px;
}

/* Responsive - stack on mobile */
@media (max-width: 768px) {
  .calendar-filters .diploma-quick-filters {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 10px 0;
    gap: 8px;
  }
  
  .calendar-filters .diploma-filter-btn {
    width: 100%;
    justify-content: center;
  }
}
