/* Timetable All */
.ft-timetable-all {
  margin: 2rem 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ft-timetable-head {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid #1f2937;
}

.ft-timetable-head__line {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.ft-timetable-head__meta {
  font-size: 0.875rem;
  color: #6b7280;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Accordion Container */
.ft-timetable-accordion {
  border: none;
  border-radius: 0.625rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.2s ease;
  width: 100%;
}

.ft-timetable-accordion:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Accordion Toggle */
.ft-timetable-toggle {
  width: 100%;
  padding: 1.5rem 2rem;
  background: linear-gradient(135deg, #3d4ba8 0%, #495bb8 100%);
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  color: #fff;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  cursor: pointer;
  transition: background 0.2s ease;
  box-sizing: border-box;
}

.ft-timetable-toggle:hover {
  background: linear-gradient(135deg, #2f3a8a 0%, #3d4ba8 100%);
}

.ft-timetable-toggle:focus {
  outline: 2px solid #4f46e5;
  outline-offset: 2px;
}

/* Toggle Label */
.ft-timetable-toggle-label {
  flex: 1;
  text-align: left;
  font-size: 1.125rem;
  color: #fff;
  word-break: break-word;
}

/* Toggle Right */
.ft-timetable-toggle-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* Chevron */
.ft-timetable-chev {
  display: inline-block;
  font-size: 1rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: #fff;
}

.ft-timetable-accordion.is-open .ft-timetable-chev {
  transform: scaleY(-1);
}

/* Panel */
.ft-timetable-panel {
  padding: 2rem;
  background: #f8f9fb;
  box-sizing: border-box;
  width: 100%;
}

.ft-timetable-panel[hidden] {
  display: none;
}

/* Table Wrapper */
.ft-table-wrap {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  background: #fff;
}

.ft-table-wrap--main {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Table */
.ft-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.ft-table thead {
  background: #f3f4f6;
  border-bottom: 2px solid #d1d5db;
}

.ft-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #1f2937;
  vertical-align: middle;
}

.ft-th-day {
  min-width: 80px;
  width: 80px;
}

.ft-th-time {
  min-width: 100px;
  width: 100px;
}

.ft-th-group {
  min-width: 120px;
  text-align: center;
  background: #f9fafb;
}

.ft-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.ft-table tbody tr:last-child {
  border-bottom: none;
}

.ft-table tbody tr:hover {
  background: #f9fafb;
}

.ft-table td {
  padding: 0.875rem;
  vertical-align: top;
}

.ft-td-day {
  font-weight: 600;
  color: #1f2937;
  background: #f3f4f6;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.ft-td-time {
  font-weight: 500;
  color: #374151;
  background: #fafbfc;
  text-align: center;
  white-space: nowrap;
}

.ft-td-cell {
  background: #fff;
  min-height: 80px;
}

/* Item */
.ft-item {
  background: #eef2ff;
  border-left: 4px solid #4f46e5;
  padding: 0.75rem;
  margin-bottom: 0.5rem;
  border-radius: 0.25rem;
  position: relative;
}

.ft-item:last-child {
  margin-bottom: 0;
}

.ft-item:hover {
  background: #e0e7ff;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.15);
  transition: all 0.2s ease;
}

/* Pattern */
.ft-pattern {
  display: inline-block;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Course */
.ft-course {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
  word-break: break-word;
}

/* Staff */
.ft-staff {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.25rem;
}

/* Staff */
.ft-staff {
  font-size: 0.75rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .ft-timetable-toggle {
    padding: 1rem 1.25rem;
    font-size: 1rem;
    gap: 0.75rem;
  }

  .ft-timetable-toggle-label {
    font-size: 1rem;
  }

  .ft-timetable-panel {
    padding: 1.5rem 1rem;
  }

  .ft-timetable-head__line {
    font-size: 1.5rem;
  }

  .ft-table thead th,
  .ft-table tbody td {
    padding: 0.75rem;
  }
}

@media (max-width: 768px) {
  .ft-timetable-accordion {
    margin-bottom: 1rem;
    border-radius: 0.375rem;
  }

  .ft-timetable-toggle {
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
  }

  .ft-timetable-toggle-label {
    font-size: 0.95rem;
  }

  .ft-timetable-chev {
    font-size: 0.875rem;
  }

  .ft-timetable-panel {
    padding: 1.25rem 1rem;
  }

  .ft-timetable-head__line {
    font-size: 1.25rem;
  }

  .ft-table {
    font-size: 0.75rem;
  }

  .ft-table thead th,
  .ft-table tbody td {
    padding: 0.5rem;
  }

  .ft-course {
    font-size: 0.75rem;
  }

  .ft-staff {
    font-size: 0.625rem;
  }
}

@media (max-width: 600px) {
  .ft-timetable-all {
    margin: 1rem 0;
  }

  .ft-timetable-head {
    margin-bottom: 1.5rem;
  }

  .ft-timetable-head__line {
    font-size: 1.125rem;
  }

  .ft-timetable-accordion {
    margin-bottom: 0.75rem;
  }

  .ft-timetable-toggle {
    padding: 0.75rem 0.875rem;
    font-size: 0.875rem;
    gap: 0.5rem;
  }

  .ft-timetable-toggle-label {
    font-size: 0.875rem;
  }

  .ft-timetable-panel {
    padding: 1rem 0.75rem;
  }

  .ft-table {
    font-size: 0.65rem;
  }

  .ft-table thead th,
  .ft-table tbody td {
    padding: 0.375rem;
  }

  .ft-item {
    padding: 0.375rem;
  }

  .ft-pattern {
    font-size: 0.5rem;
    padding: 0.125rem 0.375rem;
  }
}
