/* Timetable Edit Plugin - BetterSEQTA Plus style */

/* SEQTA sizes quickbar actions at 32×32 — layout comes from SEQTA + injected.scss */
.timetablepage .quickbar .actions .timetable-edit-quickbar-btn {
  cursor: pointer;
}

/* Edit modal animations */
@keyframes timetable-edit-overlay-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes timetable-edit-modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Edit modal overlay - fix click-through with proper stacking */
.timetable-edit-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  pointer-events: auto;
  animation: timetable-edit-overlay-in 0.2s ease-out forwards;
}

.timetable-edit-modal {
  padding: 1rem 1.5rem;
  margin: 0 1rem;
  min-width: 18rem;
  max-width: 24rem;
  width: 100%;
  box-sizing: border-box;
  background: var(--background-primary);
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  pointer-events: auto;
  border: 1px solid var(--background-secondary);
  animation: timetable-edit-modal-in 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.timetable-edit-modal h3 {
  margin: 0 0 1rem 0;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.timetable-edit-modal label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  opacity: 0.8;
}

.timetable-edit-modal input[type="text"] {
  width: 100%;
  min-width: 0;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--background-secondary);
  border-radius: 0.5rem;
  background: var(--background-secondary);
  color: var(--text-primary);
  box-sizing: border-box;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  user-select: text;
  -webkit-user-select: text;
}

.timetable-edit-modal input[type="text"]:focus {
  outline: none;
  border-color: var(--better-main, #007bff);
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.timetable-edit-modal-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.timetable-edit-modal-checkbox input {
  width: auto;
  margin: 0;
}

.timetable-edit-modal-checkbox label {
  margin: 0;
  cursor: pointer;
}

.timetable-edit-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.timetable-edit-modal-actions button {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.5rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.timetable-edit-modal-actions .timetable-edit-btn-clear {
  background: transparent;
  border: 1px solid var(--background-secondary);
  color: var(--text-primary);
}

.timetable-edit-modal-actions .timetable-edit-btn-clear:hover {
  background: var(--background-secondary);
  transform: translateY(-1px);
}

.timetable-edit-modal-actions .timetable-edit-btn-cancel {
  background: transparent;
  border: 1px solid var(--background-secondary);
  color: var(--text-primary);
}

.timetable-edit-modal-actions .timetable-edit-btn-cancel:hover {
  background: var(--background-secondary);
  transform: translateY(-1px);
}

.timetable-edit-modal-actions .timetable-edit-btn-save {
  background: var(--better-main, #007bff);
  border: none;
  color: var(--text-color, white);
}

.timetable-edit-modal-actions .timetable-edit-btn-save:hover {
  transform: scale(1.03) translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.35);
}

.timetable-edit-modal-actions .timetable-edit-btn-save:active {
  transform: scale(0.98) translateY(0);
  box-shadow: none;
}
