.schedulator-teacher-schedule,
.schedulator-instructor-schedule {
  margin: 1rem 0;
}

.schedulator-month-nav {
  margin: 10px 0 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedulator-month-nav-label {
  font-weight: 600;
}

.schedulator-month-heading {
  margin-top: 1.5rem;
}

.schedulator-events-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.schedulator-events-table th,
.schedulator-events-table td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.schedulator-events-table th {
  background: #f6f7f7;
  font-weight: 600;
}

.schedulator-event-title {
  font-weight: 600;
}

.schedulator-event-date {
  margin-top: 4px;
  color: #50575e;
}

.schedulator-group-teacher-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.schedulator-group-teacher-list li {
  margin: 0;
  line-height: 1.3;
}

.schedulator-inline-unassign-form {
  display: inline;
  margin-left: 4px;
}

.schedulator-unassign-x {
  border: 0;
  background: transparent;
  color: #b32d2e;
  cursor: pointer;
  font-weight: 700;
  line-height: 1;
  padding: 0 2px;
}

.schedulator-unassign-x:hover {
  color: #8a2424;
}

.schedulator-action-form {
  margin: 0;
}

.schedulator-action-form-assign {
  display: block;
}

.schedulator-action-form-assign select {
  min-width: 140px;
}

.schedulator-message {
  margin: 8px 0;
  padding: 10px;
  border-radius: 4px;
}

.schedulator-message-success {
  background: #e9f7ef;
  color: #1d6f42;
}

.schedulator-message-error {
  background: #fbeaea;
  color: #8a1f11;
}

.schedulator-filter-bar {
  margin: 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.schedulator-filter-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.schedulator-filter-link {
  display: inline-block;
  margin-right: 8px;
  padding: 6px 10px;
  border-radius: 4px;
  background: #f0f0f1;
  color: #1d2327;
  text-decoration: none;
}

.schedulator-filter-link.is-active {
  background: #2271b1;
  color: #fff;
}

.schedulator-past-toggle-form {
  margin: 0;
}

.schedulator-past-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid #dcdcde;
  border-radius: 4px;
  background: #fff;
  color: #1d2327;
  cursor: pointer;
}

.schedulator-past-toggle input[type="checkbox"] {
  margin: 0;
}

.schedulator-pagination {
  margin-top: 14px;
}

.schedulator-pagination-label {
  margin: 0 10px;
}

.schedulator-time-mobile-range {
  display: none;
}

.schedulator-events-region.schedulator-slide-next {
  animation: schedulator-slide-next 0.24s ease;
}

.schedulator-events-region.schedulator-slide-prev {
  animation: schedulator-slide-prev 0.24s ease;
}

.schedulator-week-header-row {
  display: none;
}

/* AJAX Loading State */
.schedulator-instructor-schedule.schedulator-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.schedulator-instructor-schedule.schedulator-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #0073aa;
  border-radius: 50%;
  animation: schedulator-spinner 1s linear infinite;
  z-index: 999;
}

@keyframes schedulator-spinner {
  0% { transform: translate(-50%, -50%) rotate(0deg); }
  100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes schedulator-slide-next {
  from { transform: translateX(16px); opacity: 0.85; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes schedulator-slide-prev {
  from { transform: translateX(-16px); opacity: 0.85; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes schedulator-highlight-fade {
  0% {
    background-color: #c8e6c9;
  }
  100% {
    background-color: transparent;
  }
}

.schedulator-event-highlighted {
  animation: schedulator-highlight-fade 5s ease-out forwards;
}

@media (max-width: 900px) {
  .schedulator-events-table,
  .schedulator-events-table thead,
  .schedulator-events-table tbody,
  .schedulator-events-table th,
  .schedulator-events-table td,
  .schedulator-events-table tr {
    display: block;
    width: 100%;
  }

  .schedulator-events-table thead {
    display: none;
  }

  .schedulator-events-table tr {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 12px;
    overflow: hidden;
  }

  .schedulator-events-table td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding: 8px 10px 8px 36%;
    min-height: 34px;
  }

  .schedulator-events-table td:last-child {
    border-bottom: none;
  }

  .schedulator-events-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 10px;
    top: 8px;
    width: 32%;
    font-weight: 600;
    color: #50575e;
  }

  .schedulator-mobile-hide-empty-week .schedulator-events-table td.schedulator-week-empty {
    display: none;
  }

  .schedulator-events-table td.schedulator-week-cell {
    display: none;
  }

  .schedulator-week-header-row {
    display: block;
    border: 0;
    margin: 0 0 8px;
  }

  .schedulator-week-header-row .schedulator-week-header-cell {
    display: block;
    width: 100%;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background: #f6f7f7;
    color: #1d2327;
    font-weight: 700;
    padding: 8px 10px;
  }

  .schedulator-time-desktop-start {
    display: none;
  }

  .schedulator-time-mobile-range {
    display: inline;
    font-weight: 600;
  }

  .schedulator-events-table td.schedulator-end-cell {
    display: none;
  }

  .schedulator-action-form-assign {
    align-items: stretch;
  }
}
