/* Cycles Page Styles */

/* Search-form filter row groups — programs checkboxes and date filter
   share a single row under the search input. */
.search-form-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  flex-basis: 100%;
  font-size: 0.8125rem;
}

.search-form-filter-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.search-form-date-filter label {
  font-weight: 500;
  color: var(--dark-gray);
}

.search-form-date-filter input[type="date"] {
  padding: 0.375rem 0.5rem;
  border: 1px solid var(--medium-gray);
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

/* Cycles index table — keep date columns on a single line and constrain
   the Elements column so long lists don't dominate the row width. */
.cycles-table th,
.cycles-table td {
  white-space: nowrap;
  vertical-align: middle;
}

.cycles-table .col-nowrap {
  white-space: nowrap;
}

.cycles-table td.col-elements {
  white-space: normal;
}

.cycles-elements-list {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 24rem;
  line-height: 1.4;
  white-space: normal;
  color: var(--text-secondary, var(--medium-gray));
  font-size: 0.8125rem;
}

/* Cycle row temporal highlighting — current rows are unmarked so they read
   as the default state. Past rows are visually de-emphasized; future rows
   get a faint accent-cycle wash. */
.cycle-row-future {
  background-color: color-mix(in oklch, var(--accent-cycle) 6%, transparent);
}

.cycle-row-past {
  background-color: var(--surface-muted);
  color: var(--text-muted);
}

.cycle-row-past a {
  color: var(--text-muted);
}

/* Cycle show page — two-column layout keeps cycle metadata and tracked
   elements alongside the workouts table to minimize vertical scrolling. */
.cycle-show-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 2fr;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 900px) {
  .cycle-show-grid {
    grid-template-columns: 1fr;
  }
}

.cycle-show-sidebar,
.cycle-show-main {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

/* Tracked-element chip row — uses the shared .element-chip pill pattern
   defined in weekly_planner.css so cycle and daily-plan chips stay
   visually consistent. */
.cycle-element-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.cycle-element-chips .element-chip-body {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

/* Cycle modal body */

.cycle-dates {
  margin-bottom: 0.5rem;
}

.cycle-progress {
  margin-bottom: 0.75rem;
}

.cycle-notes,
.cycle-elements {
  margin-top: 1rem;
}

/* Two-column layout for athlete + coach notes; stacks under 640px so
   the modal stays readable on phones. */
.cycle-notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .cycle-notes {
    grid-template-columns: 1fr;
  }
}

.cycle-note-card {
  margin: 0;
}

.cycle-note-body {
  white-space: pre-wrap;
  margin: 0;
}

.cycle-elements-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.cycle-elements-empty {
  color: var(--medium-gray);
}

.cycle-modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e5e7eb);
}
