/* Foto's nakijken (timereview.js): one photo at a time over the whole of Je foto's, the photo large at the left and
   the question beside it, the places it most likely belongs as cards with their photos, the AI's guess ringed */
.tl-review {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: flex;
  flex-direction: column;
  background: radial-gradient(130% 60% at 50% 0%, #f7f4ef, var(--surface) 75%) var(--surface);
  animation: tl-review-in 0.3s var(--ease);
}
@keyframes tl-review-in {
  from {
    opacity: 0;
    translate: 0 14px;
  }
}
.tl-review-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: calc(var(--safe-top) + 16px) var(--tl-pad) 6px;
}
.tl-review-head > div {
  display: grid;
  gap: 3px;
}
.tl-review-title {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.tl-review-sub {
  color: var(--quiet);
  font-size: 13.5px;
  line-height: 1.4;
}
.tl-review-later,
.tl-review-back,
.tl-review-skip {
  flex: none;
  min-height: 40px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--quiet);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition:
    color 0.2s,
    background 0.2s;
}
.tl-review-later:hover,
.tl-review-back:hover,
.tl-review-skip:hover {
  background: rgb(36 34 31 / 0.06);
  color: var(--text);
}
.tl-review-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(300px, 1fr);
  align-items: center;
  gap: 24px 48px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px var(--tl-pad) calc(var(--safe-bottom) + 28px);
  overflow-y: auto;
  animation: tl-review-next 0.42s var(--ease);
}
@keyframes tl-review-next {
  from {
    opacity: 0;
    translate: 24px 0;
  }
}
.tl-review-photo {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin: 0;
  min-width: 0;
}
.tl-review-photo img {
  display: block;
  max-width: 100%;
  max-height: calc(100cqh - 190px);
  border-radius: 10px;
  box-shadow:
    0 1px 2px rgb(30 20 10 / 0.18),
    0 28px 50px -26px rgb(30 20 10 / 0.6);
}
.tl-review-photo figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  color: var(--quiet);
  font-size: 12.5px;
}
/* what the AI saw is part of what's judged: whole, over as many lines as it takes, beside the date that stays one */
.tl-review-when {
  flex: none;
}
.tl-review-seen {
  min-width: 0;
  text-align: right;
  text-wrap: pretty;
}
.tl-review-ask {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.tl-review-progress {
  display: flex;
  gap: 5px;
  width: min(100%, 240px);
}
.tl-review-progress i {
  flex: 1;
  max-width: 30px;
  height: 4px;
  border-radius: 2px;
  background: rgb(36 34 31 / 0.13);
  transition: background 0.3s;
}
.tl-review-progress i.is-done {
  background: rgb(36 34 31 / 0.42);
}
.tl-review-progress i.is-now {
  background: var(--text);
}
.tl-review-ask-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.tl-review-guess {
  margin-top: -4px;
  text-wrap: pretty;
  color: var(--quiet);
  font-size: 15px;
  line-height: 1.45;
}
.tl-review-places {
  display: grid;
  gap: 10px;
}
/* a place: what the moment is called and its day over its photos in their order, the photo asked about standing ringed
   at the spot it would take (timereviewplaces.js). The whole card is one tap; in its strip a tap says the spot. The
   AI's guess carries a quiet label, never a button of its own. */
.tl-review-place {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 10px 0 10px;
  border: 1px solid rgb(36 34 31 / 0.1);
  border-radius: 14px;
  background: #fffdf9;
  cursor: pointer;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.tl-review-place:hover {
  border-color: rgb(36 34 31 / 0.22);
  box-shadow: 0 10px 22px -14px rgb(36 34 31 / 0.5);
}
.tl-review-place.is-guess {
  border-color: var(--accent);
  box-shadow:
    0 0 0 1px var(--accent),
    0 12px 26px -16px rgb(36 34 31 / 0.55);
}
.tl-review-place-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0 8px;
  padding: 2px 6px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.tl-review-place-head:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tl-review-place-words {
  flex: 1;
  display: grid;
  gap: 1px;
  min-width: 0;
}
.tl-review-place-title,
.tl-review-place-facts {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.tl-review-place-title {
  font-size: 16px;
  font-weight: 650;
}
.tl-review-place-facts {
  color: var(--quiet);
  font-size: 13px;
}
.tl-review-mark {
  flex: none;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 9%, #fffdf9);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
/* the moment's photos in a row that scrolls sideways where they're many, its ends fading so it reads as more */
.tl-review-strip {
  --thumb: 52px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 14px), transparent);
}
.tl-review-strip::-webkit-scrollbar {
  display: none;
}
.tl-review-strip img {
  flex: none;
  display: block;
  width: var(--thumb);
  height: var(--thumb);
  border-radius: 6px;
  object-fit: cover;
  -webkit-user-drag: none;
  user-select: none;
}
/* the photo asked about, where it would go: lifted a little and ringed, with room either side so it reads as between */
.tl-review-spot {
  flex: none;
  display: block;
  margin: 0 5px;
  border-radius: 8px;
  outline: 2.5px solid var(--accent);
  outline-offset: 2px;
  box-shadow: 0 6px 14px -6px rgb(36 34 31 / 0.55);
}
.tl-review-spot img {
  border-radius: 6px;
}
.tl-review-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.tl-review-more .chip {
  min-height: 40px;
}
/* after the last: a tick drawn in, and the way back */
.tl-review-done {
  grid-column: 1 / -1;
  justify-self: center;
  display: grid;
  justify-items: center;
  gap: 8px;
  max-width: 420px;
  text-align: center;
}
.tl-review-tick {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  animation: tl-tick-in 0.5s var(--spring, var(--ease));
}
.tl-review-tick svg {
  width: 36px;
  height: 36px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 22;
  stroke-dashoffset: 22;
  animation: tl-tick-draw 0.4s 0.2s var(--ease) forwards;
}
@keyframes tl-tick-in {
  from {
    scale: 0.4;
    opacity: 0;
  }
}
@keyframes tl-tick-draw {
  to {
    stroke-dashoffset: 0;
  }
}
.tl-review-done-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.015em;
}
.tl-review-done-line {
  color: var(--quiet);
  line-height: 1.45;
}
.tl-review-done-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}
.tl-review-done-buttons .chip {
  min-height: 42px;
}
/* a phone: the photo over the question, the places under it */
@container timeline (width < 760px) {
  .tl-review-head {
    padding-top: calc(var(--safe-top) + 12px);
  }
  .tl-review-sub {
    display: none;
  }
  .tl-review-body {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    align-content: start;
    gap: 16px;
    padding-top: 4px;
  }
  .tl-review-photo img {
    max-height: 34cqh;
  }
  .tl-review-ask-title {
    font-size: 22px;
  }
  .tl-review-guess {
    font-size: 14px;
  }
  .tl-review-strip {
    --thumb: 46px;
  }
  .tl-review-done {
    align-self: center;
    padding-top: 12vh;
  }
}
/* a short screen (a phone held sideways): the photo and the question side by side, the photo the screen's height */
@container timeline (height <= 500px) and (width >= 560px) {
  .tl-review-head {
    padding-top: calc(var(--safe-top) + 8px);
  }
  .tl-review-sub {
    display: none;
  }
  .tl-review-body {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
    gap: 16px 24px;
  }
  .tl-review-photo img {
    max-height: calc(100cqh - 110px);
  }
  .tl-review-ask {
    gap: 10px;
  }
  .tl-review-ask-title {
    font-size: 20px;
  }
  .tl-review-strip {
    --thumb: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tl-review,
  .tl-review-body,
  .tl-review-tick,
  .tl-review-tick svg {
    animation: none;
  }
  .tl-review-tick svg {
    stroke-dashoffset: 0;
  }
}
