/**
 * Timetable.js Custom Theme for Spa Tour Event
 * Matches the teal/gold aesthetic (#7dd3c0 / #fbbf24)
 */

/* Container Styles */
.timetable {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-x: auto;
  position: relative;
  width: 100%;
}

/* Time labels on the left */
.timetable .time-label,
.timetable aside li span {
  font-weight: 600;
  color: #111827;
  font-size: 0.875rem;
  padding: 1rem 0.75rem;
  border-right: 2px solid #e5e7eb;
  background: #f9fafb;
  min-width: 80px;
  text-align: center;
  display: block;
}

/* Event entries - IMPORTANT: Override inline styles */
.timetable .time-entry {
  background: #7dd3c0 !important;
  border: 1px solid #5cb8a6 !important;
  color: white !important;
  border-radius: 4px !important;
  padding: 0.5rem !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important;
  min-height: 50px !important;
  display: block !important;
  position: absolute !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.timetable .time-entry:hover {
  background: #5cb8a6 !important;
  border-color: #4a9d8d !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
  transform: translateY(-2px);
}

/* Event title */
.timetable .time-entry .event-title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  color: white;
}

/* Event venue/location */
.timetable .time-entry .event-venue {
  font-size: 0.75rem;
  opacity: 0.9;
  margin-top: 0.25rem;
  color: white;
}

/* Event pricing */
.timetable .time-entry .event-price {
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.25rem;
  color: white;
}

/* Discount badge */
.timetable .time-entry .discount-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ef4444;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
}

/* Free badge */
.timetable .time-entry .free-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #10b981;
  color: white;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
}

/* Column headers (venues) */
.timetable aside li,
.timetable .row-heading {
  background: #f9fafb !important;
  border-bottom: 2px solid #7dd3c0 !important;
  color: #111827 !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  padding: 1rem !important;
  text-align: center !important;
}

/* Timeline container */
.timetable .room-timeline {
  position: relative !important;
  min-height: 50px !important;
}

.timetable section {
  overflow-x: auto !important;
}

.timetable header ul {
  display: flex !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.timetable header li {
  flex: 1 !important;
  min-width: 60px !important;
  border-right: 1px solid #e5e7eb !important;
}

.timetable time ul li {
  position: relative !important;
  min-height: 70px !important;
  border-bottom: 1px solid #e5e7eb !important;
}

/* Grid lines */
.timetable .time-row {
  border-bottom: 1px solid #e5e7eb;
}

.timetable .time-row:last-child {
  border-bottom: none;
}

/* Category-based colors (optional overrides) */
.timetable .time-entry.category-yoga {
  background: #7dd3c0 !important;
  border-color: #5cb8a6 !important;
}

.timetable .time-entry.category-massage {
  background: #8b5cf6 !important;
  border-color: #7c3aed !important;
}

.timetable .time-entry.category-meditation {
  background: #fbbf24 !important;
  border-color: #f59e0b !important;
  color: #78350f !important;
}

.timetable .time-entry.category-spa {
  background: #ec4899 !important;
  border-color: #db2777 !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .timetable {
    font-size: 0.875rem;
  }

  .timetable .time-label {
    min-width: 80px;
    font-size: 1rem;
    padding: 1rem 0.5rem;
  }

  .timetable .time-entry {
    padding: 0.5rem;
    min-height: 50px;
  }

  .timetable .time-entry .event-title {
    font-size: 0.75rem;
  }

  .timetable .time-entry .event-venue,
  .timetable .time-entry .event-price {
    font-size: 0.625rem;
  }

  .timetable .column-header {
    font-size: 0.75rem;
    padding: 0.75rem 0.5rem;
  }
}

/* Duration indicator */
.timetable .time-entry .duration {
  font-size: 0.625rem;
  opacity: 0.8;
  margin-top: 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.timetable .time-entry .duration::before {
  content: "⏱";
  font-size: 0.75rem;
}

/* Empty slot styling */
.timetable .empty-slot {
  min-height: 80px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
}

/* Loading state */
.timetable.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Scrollbar styling */
.timetable::-webkit-scrollbar {
  height: 8px;
}

.timetable::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.timetable::-webkit-scrollbar-thumb {
  background: #7dd3c0;
  border-radius: 4px;
}

.timetable::-webkit-scrollbar-thumb:hover {
  background: #5cb8a6;
}
