/* ==========================================================================
   UA Living Spec Book: daily logs section styles (sb-dlog)
   Feed of dated studio updates with photo strips. Mirrors the revisions
   feed anatomy (hairline-separated articles) and consumes tokens from
   css/tokens.css only. No brand hex in this file.
   ========================================================================== */

.sb-dlog-feed {
  border-top: 1px solid var(--ua-line-soft);
}

.sb-dlog {
  display: grid;
  gap: var(--ua-s3);
  padding-block: var(--ua-s5);
  border-bottom: 1px solid var(--ua-line-soft);
}

/* --- Date line: formatted date + muted freshness hint --- */
.sb-dlog__date {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: var(--ua-s1) var(--ua-s3);
  margin: 0;
  font-size: var(--ua-fs-tiny);
  font-weight: 200;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ua-text-muted);
}

.sb-dlog__ago {
  font-size: var(--ua-fs-tiny);
  font-weight: 200;
  text-transform: none;
  letter-spacing: 0.04em;
  color: var(--ua-text-faint);
}

/* Double class beats the generic .sb-section__body h3 heading margins
   regardless of stylesheet order. */
.sb-dlog .sb-dlog__title {
  margin: 0;
  font-family: var(--ua-font-display);
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.2;
  color: var(--ua-text-strong);
}

.sb-dlog__note p {
  max-width: 64ch;
  margin: 0 0 var(--ua-s3);
  font-weight: 200;
  line-height: 1.7;
}

.sb-dlog__note p:last-child {
  margin-bottom: 0;
}

/* --- Photo strip: horizontally scrollable thumbnail buttons ---
   The strip is a scroll container, which clips painted outlines to its
   padding box; the inner padding (offset by negative margins so the layout
   holds) keeps the focus ring fully visible on every thumbnail. */
.sb-dlog__photos {
  display: flex;
  gap: var(--ua-s3);
  margin: var(--ua-s1) -6px 0;
  padding: 6px 6px var(--ua-s2);
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scroll-padding-left: 6px;
  -webkit-overflow-scrolling: touch;
}

.sb-dlog__thumb {
  flex: 0 0 auto;
  width: 138px;
  height: 104px;
  overflow: hidden;
  border-radius: var(--ua-radius);
  background: var(--ua-line-soft);
  cursor: zoom-in;
  scroll-snap-align: start;
}

.sb-dlog__img,
.sb-dlog__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  transition: transform var(--ua-slow) var(--ua-ease);
}

/* The shared fallback tile keeps its own centered flex layout; it only
   needs permission to shrink into the fixed-size thumb. */
.sb-dlog__thumb .ua-img-fallback {
  min-height: 0;
  height: 100%;
}

.sb-dlog__thumb:hover img,
.sb-dlog__thumb:focus-visible img {
  transform: scale(1.04);
}

/* ======================================================================
   Responsive
   ====================================================================== */
@media (max-width: 480px) {
  .sb-dlog {
    padding-block: var(--ua-s4);
  }

  .sb-dlog__thumb {
    width: 112px;
    height: 86px;
  }
}

/* ======================================================================
   Reduced motion
   ====================================================================== */
@media (prefers-reduced-motion: reduce) {
  .sb-dlog__img,
  .sb-dlog__thumb img,
  .sb-dlog__thumb .ua-img-fallback {
    transition: none;
  }

  .sb-dlog__thumb:hover img,
  .sb-dlog__thumb:focus-visible img {
    transform: none;
  }
}
