/* ปรับให้ responsive */
#user-course-calendar {
  font-size: 0.95rem;
  max-width: 100%;
  padding: 10px;
}

.fc .fc-toolbar-title {
  font-size: 1.2rem;
}

@media (max-width: 600px) {
  .fc .fc-toolbar {
    flex-direction: column;
    gap: 8px;
  }

  .fc .fc-daygrid-event {
    font-size: 0.75rem;
    padding: 2px;
  }
}

.event-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.event-modal-content {
  background: #fff;
  padding: 24px 20px 20px;
  border-radius: 10px;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  font-family: 'Sarabun', sans-serif;
}

.event-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #555;
}

.event-modal-close:hover {
  color: #e74c3c;
}

.event-modal-content h2 {
  margin-top: 0;
  font-size: 20px;
}

.event-modal-content p {
  margin-bottom: 8px;
}

.upcoming-wrapper {
  display: flex;
  align-items: flex-start;
  min-height: 40px;
}
.upcoming-color-bar {
  width: 6px;
  height: 100%;
  border-radius: 3px;
  margin-right: 10px;
  background: var(--bar-color); /* ใช้ JS set */
}