/*
 * Shared session-card styling -- used on the My List page and (Story 114)
 * the festival programme's List view, so a session's on-my-list/clash
 * status reads the same way wherever it's shown. Time/duration in a fixed
 * left column, title/venue/tags in the remainder, matching the day
 * timeline's (programme-calendar.css) own on-list/clash color language for
 * consistency across List and Calendar views.
 */
/* Also used as a whole-card link on the programme List view (an <a class=
   "session-card">) -- so text inside keeps its own colors rather than
   picking up default link blue/underline. */
a.session-card {
  color: inherit;
  text-decoration: none;
}

a.session-card:hover {
  background: var(--color-accent-tint);
}

.session-card {
  display: grid;
  grid-template-columns: 3.5rem minmax(0, 1fr);
  gap: var(--space-3);
  align-items: start;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border-subtle);
}

.session-card__time-value {
  font-family: var(--font-family-base);
  font-weight: var(--font-weight-bold);
  font-size: 1.0625rem;
  line-height: 1;
}

.session-card__duration {
  font-size: 0.6875rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  margin-top: 3px;
}

.session-card__title {
  font-size: 1rem;
  margin: 0 0 var(--space-1);
}

.session-card__venue {
  font-size: 0.8125rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.session-card--on-list {
  background: var(--color-accent-tint);
  border-left: 6px solid var(--color-accent);
  /* the 6px accent border eats into the inset, so every row's text still starts at the same x */
  padding-left: calc(var(--space-4) - 6px);
}

/* A clash with the visitor's own list gets the crosshatch (see --pattern-clash-hatch in tokens.css) across
   the whole row, as well as the muted text and red rule below it. A friend's clash (.session-card__clash--friend)
   deliberately doesn't: it is a softer warning. */
.session-card--clash {
  background-image: var(--pattern-clash-hatch);
}

.session-card--clash .session-card__title {
  color: var(--color-text-muted);
}

.session-card--clash .session-card__time-value {
  color: var(--color-text-muted);
}

.session-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}

.session-card__on-list {
  font-size: 0.65625rem;
  font-weight: var(--font-weight-black);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.session-card__premiere {
  font-size: 0.65625rem;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.session-card__clash {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border-top: var(--border-width-rule) solid var(--color-accent);
  padding-top: var(--space-1);
  margin-top: var(--space-2);
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.session-card__clash-label {
  flex: none;
  font-weight: var(--font-weight-black);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
}

/* Landing point after "Add to my list" (the form's returnUrl ends in
   #session-row-{id}), so the visitor comes back to the row they were on
   rather than the top of the page. Cleared of the sticky programme header
   (see .programme-filters for why this is a fixed generous value). */
a.session-card[id^="session-row-"] {
  scroll-margin-top: 17rem;
}

/* My List: details on the left, the Remove button on the right. */
.session-card--my-list .session-card__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.session-card--my-list .session-card__details {
  flex: 1 1 auto;
  min-width: 0;
}

.session-card--my-list .session-card__body > form {
  flex: none;
}


/* My List's cards sit directly in the page shell (no .programme-day__sessions
   wrapper), so they reach the shell's full width themselves -- same as the
   programme List view's cards. */
.session-card--my-list {
  margin: 0 calc(-1 * var(--space-4));
}

/* My List: one heading per local day, so its cards read as a day's group rather than a single
   undated run -- the date is otherwise the only thing telling two picks apart. First one sits
   flush under the clash notice/heading above with no extra gap; later ones get the section break
   a new day deserves. */
.my-list-day-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin: var(--space-5) 0 var(--space-2);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--color-border-subtle);
  font-size: 1rem;
}

.my-list-day-heading:first-of-type {
  margin-top: var(--space-3);
}

.my-list-day-heading__count {
  flex: none;
  font-size: 0.75rem;
  font-weight: var(--font-weight-medium);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Story 146: overlaps a pick of someone in one of the visitor's Linked circles. A heads-up, not
   a conflict on their own list, so it reads softer than .session-card__clash: dashed, muted. */
.session-card__clash--friend {
  border-top: var(--border-width-rule) dashed var(--color-text-muted);
}

.session-card__clash--friend .session-card__clash-label {
  color: var(--color-text);
}
