/* ─── Activity Cards (shared with activity_card.html) ─── */

.run-card {
  width: 95%;
  max-width: 450px;
  padding: 15px;
  border-bottom: 1px solid #ccc;
}

.run-card:target {
  animation: highlight-pulse 2s ease-out;
}

@keyframes highlight-pulse {
  20% { outline: 2px solid #9CB384; }
  0%, 100% { outline: 2px solid transparent; }
}

.run-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 4px;
}

.run-badge { font-weight: bold; letter-spacing: 0.5px; }
.run-main { font-size: 1.1rem; font-weight: 600; color: #333; }
.run-sub { font-size: 1.1rem; color: #666; margin-top: 2px; }

/* ─── Plan Set ─── */

.plan-set {
  width: 95%;
  max-width: 450px;
  margin: 0 auto 20px;
  border: 2px solid #ccc;
}

/* ─── Compact Rows (prev / next) ─── */

.plan-compact {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 12px;
}

.plan-date {
  font-size: 0.7rem;
  color: #999;
  flex-shrink: 0;
}

.plan-label {
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-detail {
  font-size: 0.8rem;
  flex-shrink: 0;
}

.plan-badge {
  font-size: 0.68rem;
  font-weight: bold;
  letter-spacing: 0.3px;
  margin-left: auto;
  flex-shrink: 0;
}

/* Previous: done state — muted with strikethrough */
.plan-prev {
  background-color: #f4eeeb;
  border-bottom: 1px dashed #e5dfdc;
}

.plan-prev .plan-label {
  color: #aaa;
  text-decoration: line-through;
  text-decoration-color: #ccc;
}

.plan-prev .plan-detail { color: #bbb; }
.plan-prev .plan-badge { color: #bbb; }

.plan-prev .plan-date::before {
  content: "✓ ";
  color: #9CB384;
  font-weight: bold;
}

/* Next: slightly faded */
.plan-next {
  background-color: #f9f4f1;
  border-top: 1px solid #ccc;
}

.plan-next .plan-label { color: #888; }
.plan-next .plan-detail { color: #aaa; }
.plan-next .plan-badge { color: #aaa; }

/* ─── Commentary (under prev row) ─── */

.plan-commentary {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.4;
  padding: 4px 12px 8px;
  background-color: #f4eeeb;
  border-bottom: 1px solid #ccc;  border-left: 2px solid #ccc;
}

.plan-commentary span:first-child {
  font-weight: bold;
  margin-right: 4px;
}

.checkpoint-inline {
  display: block;
  font-size: 0.7rem;
  color: #3A5F52;
  margin-top: 2px;
}

/* Status border colors */
.status-crushed_it { border-left-color: #3A5F52; }
.status-on_track   { border-left-color: #9CB384; }
.status-solid      { border-left-color: #9CB384; }
.status-minor_miss { border-left-color: #d4b896; }
.status-caution    { border-left-color: #c27a5e; }
.status-off_track  { border-left-color: #a05040; }

/* ─── Current Detail Card ─── */

.plan-detail-card {
  padding: 12px 14px;
  background-color: #f7edeb;
  border-left: 2px solid #3A5F52;
}

.plan-detail-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.plan-detail-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #333;
}

.plan-detail-sub {
  font-size: 0.82rem;
  color: #666;
  margin-top: 2px;
}

.plan-desc {
  font-size: 0.78rem;
  color: #3A5F52;
  line-height: 1.4;
  margin: 6px 0;
  padding: 5px 8px;
  background-color: #ebd0cc;
}

.plan-segments {
  margin-top: 8px;
  border-top: 1px dashed #3A5F52;
  padding-top: 6px;
}

.seg {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: #333;
  padding: 2px 0;
}

.seg-pace {
  font-weight: normal;
  font-size: 0.75rem;
  color: #666;
}

.plan-extras {
  font-size: 0.72rem;
  color: #888;
  margin-top: 4px;
}

.fuel-marker {
  padding: 0 3px;
  background-color: #ebd0cc;
  font-size: 0.7rem;
  color: #3A5F52;
  margin-left: 2px;
}

/* ─── Badge Text Colors ─── */

.badge-crushed_it { color: #3A5F52; }
.badge-on_track   { color: #3A5F52; }
.badge-solid      { color: #6a8a5e; }
.badge-minor_miss { color: #a08050; }
.badge-caution    { color: #c27a5e; }
.badge-off_track  { color: #a05040; }

/* ─── Checkpoint ─── */

.checkpoint-card { border-left-color: #c27a5e; }

.checkpoint-callout {
  font-size: 0.72rem;
  color: #c27a5e;
  margin-top: 6px;
  padding: 4px 6px;
  border: 1px dashed #c27a5e;
}

.checkpoint-callout strong {
  font-size: 0.62rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-right: 4px;
}

/* ─── Image Strip + Expand ─── */

.img-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 8px;
}

.img-expand {
}

.img-expand[open] {
  grid-column: 1 / -1;
}

.img-expand summary {
  list-style: none;
  cursor: pointer;
  line-height: 0;
  display: inline-block;
}

.img-expand summary::-webkit-details-marker { display: none; }
.img-expand summary::marker { display: none; content: ''; }

.img-expand summary img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 3px;
  transition: opacity 0.15s;
}

.img-expand summary img:hover {
  opacity: 0.75;
}

.img-expand > img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 3px;
  margin-top: 6px;
}

/* ─── Unit Toggle ─── */

.unit-toggle { display: flex; justify-content: center; margin: 10px 0; }
.toggle-btn { display: inline-flex; gap: 3px; text-decoration: none; }

.toggle-label {
  padding: 3px 10px;
  font-size: 0.8rem;
  color: #3A5F52;
  transition: all 0.2s ease;
}

.toggle-label.active { background-color: #ebd0cc; color: #333; }
.toggle-label:not(.active):hover { background-color: #9CB384; color: #333; }

.splits-inline {
  font-size: 0.75rem;
  color: #888;
  margin-top: 4px;
}
