/* Calendar Styles - Mobile First Approach */

/* Calendar Container */
.container-calendar {
  width: 100%;
  padding-right: var(--spacing-unit);
  padding-left: var(--spacing-unit);
  margin-right: auto;
  margin-left: auto;
  max-width: none;
}

/* Workout Card - Clean slate styling */
.workout-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--dark-gray);
  border-radius: 0.25rem;
  margin: 0.25rem 0;
  overflow: hidden;
  background-color: transparent;
}

/* Stratified Day Sections - Progressive lightening creates visual depth */
.day-section {
  padding: 0.5rem;
  margin: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.day-section:last-child {
  border-bottom: none;
}

/* The day's own cycles, then the chip that opens the rest
   (Components::Calendar::CycleRow, on every calendar day). The filled menu
   list spans the row's positioned ancestor: the day's cycles band
   (.day-band-cycles), wherever a day is drawn. */
.calendar-cycle-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  /* May shrink inside a band's flex row, so a long cycle name clips in
     its chip rather than pushing a narrow day wider. */
  min-width: 0;
}

/* Two tones of one hue, so one ink reads on both: the darker covers the
   days done, the lighter the days left. */
.calendar-cycle-chip {
  background: linear-gradient(
    to right,
    oklch(80% 0.05 250) var(--progress),
    oklch(96% 0.01 250) var(--progress)
  );
}

.calendar-cycle-menu-item {
  padding: 0.125rem 0;
}

/* Desktop Styles - Applied for larger screens */
@media (min-width: 768px) {
  /* Desktop navigation layout - keep column to separate compact nav from cycle filters */
  .calendar-navigation {
    flex-direction: column;
    gap: 1rem;
  }

  /* Desktop cycle filters - horizontal wrapping */
  .cycle-filters {
    justify-content: flex-start;
  }

}

/* Athlete Day View */
.calendar-day-view {
  max-width: 800px;
  margin: 0 auto;
  padding: 1rem;
}

.calendar-day-workouts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 1rem;
}

/* Athlete Workout Card */
.athlete-workout-card {
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 0.5rem;
  overflow: hidden;
}

.athlete-workout-card-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.athlete-workout-card-name {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.athlete-workout-card-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.athlete-workout-format-badge {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.athlete-workout-time-cap {
  font-size: 0.875rem;
}

.athlete-workout-description {
  padding: 1rem;
  white-space: pre-wrap;
  font-size: 0.9375rem;
  line-height: 1.6;
  border-bottom: 1px solid var(--border-color, #e5e7eb);
}

.athlete-gym-notes {
  border-top: 1px solid var(--border-color, #e5e7eb);
}

.athlete-gym-notes-label {
  padding: 0.75rem 1rem 0.25rem;
  font-weight: 500;
  font-size: 0.875rem;
}

.athlete-gym-notes-body {
  padding: 0 1rem 1rem;
  white-space: pre-wrap;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted, #6b7280);
}

/* Lightweight workout name chip for the read-only calendar grid */
.calendar-workout-chip {
  display: block;
  padding: 0.15rem 0.4rem;
  margin-bottom: 0.15rem;
  border-radius: 0.25rem;
  font-size: 0.8rem;
  background: var(--light-gray);
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

a.calendar-workout-chip:hover {
  background-color: rgba(0, 0, 0, 0.05);
}
