/* Schedule / Calendar Styles */

/* Index page */
.schedule-index {
  max-width: 1200px;
  margin: 0 auto;
}

.schedule-section-title {
  font-size: 1.25rem;
  color: var(--text-color);
  margin: 1.5rem 0 1rem;
}

.schedule-section-title--past {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.1rem;
  padding: 0.5rem 0;
}

/* Event card list */
.schedule-events-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.schedule-events-list--past {
  margin-top: 1rem;
}

.schedule-past-section {
  margin-top: 2rem;
}

/* Event card */
.schedule-event-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: var(--card-shadow);
  transition: box-shadow 0.15s ease;
}

.schedule-event-card:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.schedule-event-card--past {
  opacity: 0.7;
}

.schedule-event-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.schedule-event-title {
  margin: 0;
  font-size: 1.15rem;
}

.schedule-event-title a {
  color: var(--text-color);
  text-decoration: none;
}

.schedule-event-title a:hover {
  color: var(--primary);
}

/* Event type badges */
.event-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.event-type-badge--game {
  background: var(--primary-light, #fffbeb);
  color: var(--primary, #b45309);
}

.event-type-badge--practice {
  background: #ecfdf5;
  color: #059669;
}

.event-type-badge--other {
  background: #eff6ff;
  color: #2563eb;
}

.dark-mode .event-type-badge--practice {
  background: rgba(5, 150, 105, 0.15);
}

.dark-mode .event-type-badge--other {
  background: rgba(37, 99, 235, 0.15);
}

/* Event meta info */
.event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.event-meta--detail {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.event-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.event-location-link {
  color: var(--primary);
  text-decoration: none;
}

.event-location-link:hover {
  text-decoration: underline;
}

/* Group badges */
.event-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.event-group-badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
}

/* RSVP summary on cards */
.rsvp-summary {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-top: 0.5rem;
  border-top: 1px solid var(--border-color);
}

.rsvp-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* Show page */
.schedule-show {
  max-width: 900px;
  margin: 0 auto;
}

.schedule-event-detail {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.schedule-event-detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.schedule-event-detail-title {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-color);
}

.schedule-event-description {
  line-height: 1.6;
  color: var(--text-color);
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

/* RSVP section */
.rsvp-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.rsvp-section h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.rsvp-buttons {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.rsvp-form {
  display: contents;
}

.rsvp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.6rem 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-color);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.rsvp-btn:hover {
  border-color: var(--primary);
  background: var(--primary-light, #fffbeb);
}

.rsvp-btn--active.rsvp-btn--yes {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}

.rsvp-btn--active.rsvp-btn--no {
  border-color: #dc2626;
  background: #fef2f2;
  color: #dc2626;
}

.rsvp-btn--active.rsvp-btn--maybe {
  border-color: #d97706;
  background: #fffbeb;
  color: #d97706;
}

.dark-mode .rsvp-btn--active.rsvp-btn--yes {
  background: rgba(5, 150, 105, 0.15);
}

.dark-mode .rsvp-btn--active.rsvp-btn--no {
  background: rgba(220, 38, 38, 0.15);
}

.dark-mode .rsvp-btn--active.rsvp-btn--maybe {
  background: rgba(217, 119, 6, 0.15);
}

.rsvp-counts {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.rsvp-count {
  display: inline-flex;
  align-items: center;
}

/* Itinerary timeline */
.itinerary-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.itinerary-section h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.itinerary-timeline {
  position: relative;
  padding-left: 1.5rem;
}

.itinerary-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0.35rem;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.itinerary-item {
  display: flex;
  gap: 1rem;
  position: relative;
  padding-bottom: 1.25rem;
}

.itinerary-item:last-child {
  padding-bottom: 0;
}

.itinerary-item::before {
  content: "";
  position: absolute;
  left: -1.15rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--card-bg);
}

.itinerary-item-time {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
  min-width: 5rem;
}

.itinerary-item-content {
  flex: 1;
}

.itinerary-item-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
  color: var(--text-color);
}

.itinerary-item-description {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Attendance table */
.attendance-section {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--card-shadow);
  margin-bottom: 1.5rem;
}

.attendance-section h3 {
  margin: 0 0 1rem;
  font-size: 1.15rem;
}

.attendance-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.attendance-table th,
.attendance-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.attendance-table th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

.attendance-table td {
  font-size: 0.9rem;
}

.attendance-checkbox {
  width: 1.2rem;
  height: 1.2rem;
  cursor: pointer;
}

.rsvp-response {
  font-size: 0.85rem;
}

/* Form page */
.schedule-form {
  max-width: 800px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-group--half {
  flex: 1;
}

/* Checkbox group for groups selection */
.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  cursor: pointer;
}

/* Itinerary editor in form */
.itinerary-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.itinerary-editor-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 6px;
  border: 1px solid var(--border-color);
}

.itinerary-editor-item-fields {
  display: flex;
  flex: 1;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.itinerary-editor-item-fields .form-input--sm {
  font-size: 0.85rem;
  padding: 0.4rem 0.6rem;
}

.itinerary-editor-item-fields input[type="time"] {
  max-width: 8rem;
}

.itinerary-editor-item-fields input[type="text"]:first-of-type {
  flex: 1;
  min-width: 8rem;
}

.itinerary-editor-item-fields input[type="text"]:last-of-type {
  flex: 2;
  min-width: 10rem;
}

.itinerary-editor-remove {
  cursor: pointer;
}

.itinerary-editor-remove .hidden {
  display: none;
}

.icon-btn--sm {
  padding: 0.3rem;
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 640px) {
  .schedule-event-card {
    padding: 1rem;
  }

  .schedule-event-card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .event-meta {
    flex-direction: column;
    gap: 0.35rem;
  }

  .rsvp-buttons {
    flex-direction: column;
  }

  .rsvp-btn {
    justify-content: center;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .itinerary-editor-item {
    flex-direction: column;
    align-items: stretch;
  }

  .itinerary-editor-item-fields {
    flex-direction: column;
  }

  .itinerary-editor-item-fields input[type="time"] {
    max-width: none;
  }

  .itinerary-item {
    flex-direction: column;
    gap: 0.25rem;
  }

  .itinerary-item-time {
    min-width: auto;
  }

  .attendance-table {
    font-size: 0.85rem;
  }

  .attendance-table th,
  .attendance-table td {
    padding: 0.5rem;
  }
}
