/* Component: day strip — one pip a day on the voyage screen (lane UI-V). ✓ past, ⛴️ today,
   ①②③ port days in their stop colors; marks (📅 ⏱️ 🧾 🏁, the card once it came) sit above a pip. */

.day-strip {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 2px 0;
  min-width: 0;
}

.day-pip {
  --stop-color: var(--sea-500);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1 1 0;
  min-width: 26px;
  max-width: 72px;
}

/* The line that joins the days. */
.day-pip::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 11px;
  height: 4px;
  background: var(--line);
}

.day-pip:first-child::before {
  left: 50%;
}

.day-pip:last-child::before {
  right: 50%;
}

.day-pip.is-past::before {
  background: var(--sea-400);
}

.day-pip__marks {
  display: flex;
  justify-content: center;
  min-height: 18px;
  font-size: 0.8rem;
  line-height: 18px;
  letter-spacing: -2px;
}

.day-pip__dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin: 2px 0;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--card);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  line-height: 1;
}

.day-pip.is-past .day-pip__dot {
  border-color: var(--sea-500);
  background: var(--sea-500);
}

.day-pip--port .day-pip__dot {
  width: 24px;
  height: 24px;
  margin: 0;
  border-color: var(--stop-color);
  background: #ffffff;
  color: var(--stop-color);
  font-size: 0.95rem;
}

.day-pip--port.is-past .day-pip__dot {
  background: var(--stop-color);
  color: #ffffff;
}

.day-pip.is-today .day-pip__dot {
  width: 28px;
  height: 28px;
  margin: -2px 0;
  border: 3px solid var(--accent-500);
  background: var(--accent-100);
  font-size: 1rem;
  box-shadow: 0 0 0 3px rgba(245, 158, 43, 0.25);
}

/* Many days: smaller pips, two rows on phones (no sideways scroll). */
@media (max-width: 37.5em) {
  .day-pip {
    min-width: 22px;
  }

  .day-strip[data-days] .day-pip {
    flex-basis: calc(100% / 13);
  }

  /* UI-V2: a long trip (13–18 days, a crossing) wraps to two even rows (renderDayStrip sets --per-row). */
  .day-strip[data-days] .day-pip {
    flex-basis: calc(100% / var(--per-row, 13));
  }

  .day-pip__marks {
    font-size: 0.7rem;
    min-height: 15px;
    line-height: 15px;
  }
}
