/** File: assets/ThruTheYears/thru-the-years.css
 *  written by Claude Code, at Jesse M. Heines's request
 *  maintained by Jesse M. Heines, jesse@jesseheines.com using Claude Code
 *  Copyright (c) 2026 by Jesse M. Heines.  All rights reserved.  May be
 *    freely copied or excerpted for educational purposes with credit to
 *    the author and maintainer.
 *  created on October 31, 2026
 *
 *  Styles for the "Through the Years" auto-advancing photo carousel. See
 *  CLAUDE.md in this folder for the full feature spec. This stylesheet is
 *  loaded only by index.html, where it replaces the template's static
 *  profile-headshot styling in the hero section (see assets/css/index.css
 *  for the matching removal note).
 *
 *  Round 2 (2026-11-01): 350px picture frame (caption column stays at
 *  400px), 10px rounded corners, light-green arrows/hover text. The
 *  left/right positioning of the whole carousel relative to the sidebar
 *  and the hero text is now handled in assets/css/index.css's
 *  .hero .container rule, not here.
 */

/* Outer placeholder: sits where the template's headshot used to be, i.e.
   the first flex child inside .hero .container (see assets/css/index.css).
   Its own left/right position comes from the parent's padding-left and
   gap -- see .hero .container in assets/css/index.css. */
#thru-the-years {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(400px, 100%);
}

/* The framed photo itself: 350x350 square (narrower than the 400px
   caption column below it, so it's centered within that column), 1px
   black border, 10px rounded corners, per the Round 2 spec. */
#thru-the-years .tty-frame {
  position: relative;
  width: 350px;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 1 / 1;
  border: 1px solid #000;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  /* added by Claude, 2026-11-01 09:15 -- Round 3: 5px drop shadow to the
     right and bottom, desktop only (turned off in the mobile media
     query below).
     -- updated by Claude, 2026-11-03 10:30, Round 4: a single offset
     shadow read as a flat solid-color block, not a "drop shadow", so
     this now stacks five 1px-apart offset shadows at decreasing opacity
     to approximate a gradient fading from black (closest to the frame)
     out to transparent (5px out). */
  box-shadow:
    1px 1px 0 0 rgba(0, 0, 0, 0.45),
    2px 2px 0 0 rgba(0, 0, 0, 0.36),
    3px 3px 0 0 rgba(0, 0, 0, 0.27),
    4px 4px 0 0 rgba(0, 0, 0, 0.18),
    5px 5px 0 0 rgba(0, 0, 0, 0.09);
}

/* removed by Claude, 2026-11-03 10:30 -- Round 4: this single <img>
   fade-out-then-swap-then-fade-in was a fade THROUGH black, not a true
   crossfade. Replaced below with two stacked <img> layers (both added
   in thru-the-years.js's buildDom()) that fade in/out at the same time.
#thru-the-years .tty-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  transition: opacity 0.25s ease-in-out;
}

#thru-the-years .tty-photo.tty-fading {
  opacity: 0;
}
*/
/* added by Claude, 2026-11-03 10:30 -- Round 4: two of these are stacked
   directly on top of each other (absolutely positioned within
   .tty-frame, which is already position: relative), so the incoming
   picture can fade in while the outgoing one fades out at the same
   time -- a true crossfade. thru-the-years.js toggles tty-active on
   whichever layer should currently be visible. */
#thru-the-years .tty-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

#thru-the-years .tty-photo.tty-active {
  opacity: 1;
}

/* "n of total" badge overlaid in the frame's bottom-right corner. */
#thru-the-years .tty-counter {
  position: absolute;
  right: 0;
  bottom: 0;
  background: #000;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  padding: 3px 8px;
  /* matches .tty-frame's border-radius, Round 2 */
  border-top-left-radius: 10px;
}

/* Caption row: left arrow, caption text, right arrow. */
#thru-the-years .tty-caption-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  /* removed by Claude, 2026-11-03 10:30 -- Round 4: this 8px gap from
     the frame now belongs to .tty-title below, which moved in front of
     this row (title is no longer nested inside .tty-caption)
  margin-top: 8px;
  */
  margin-top: 2px; /* added by Claude, 2026-11-03 10:30 */
}

#thru-the-years .tty-arrow-btn {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 2px;
  margin: 0;
  line-height: 0;
  cursor: pointer;
}

#thru-the-years .tty-arrow-img {
  display: block;
  width: 20px;
  height: auto;
}

/* Caption text is kept small so all 3 lines fit within the 400px photo
   width, per spec. */
#thru-the-years .tty-caption {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--contrast-color);
}

/* added by Claude, 2026-11-03 10:30 -- Round 4: .tty-title moved out of
   .tty-caption (see thru-the-years.js's buildDom()) so it can be as
   wide as the whole .tty-caption-row below it (arrows included), not
   just the narrower .tty-caption column between the arrows -- titles
   were wrapping onto a 2nd line otherwise. */
#thru-the-years .tty-title {
  width: 100%;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--contrast-color);
  font-weight: bold;
  margin-top: 8px;
}

#thru-the-years .tty-age {
  font-weight: bold;
}

/* Lets an individual title (e.g. the family-photo caption in the data
   file) de-emphasize part of itself with <span class="nobold">. */
#thru-the-years .tty-title .nobold {
  font-weight: normal;
}

#thru-the-years .tty-date {
  font-weight: normal;
}

#thru-the-years .tty-hover-note {
  font-style: italic;
  /* removed by Claude, 2026-11-01 09:15 -- Round 3: now boldface, see below
  font-weight: normal;
  */
  /* added by Claude, 2026-11-01 09:15 -- Round 3: bold + updated light
     green shade (was rgb(150, 211, 95), matching the Round 2 arrow color) */
  font-weight: bold;
  color: rgb(159, 214, 109);
}

/* Applied while the mouse is over the photo, pausing auto-advance. */
#thru-the-years .tty-hover-note.tty-paused {
  font-weight: bold;
  /* removed by Claude, 2026-11-01 09:15 -- Round 3: replaced with yellow,
     to match the Round 3 paused-arrow color change
  color: #d00000;
  */
  color: rgb(245, 236, 0); /* added by Claude, 2026-11-01 09:15 */
}

/* added by Claude, 2026-11-03 10:30 -- Round 4: "Age Links" jump menu,
   built from the optional "menu": <integer> entries in
   ThruTheYears-CaptionList.json. Bar background matches the normal
   (non-paused) .tty-hover-note color, per spec; only rendered at all
   when at least one entry has a "menu" value (see
   thru-the-years.js's buildDom()).
   -- updated by Claude, 2026-11-03 11:15, Round 5: the label and the
   numbers are now one flat flex row (no nested .tty-menu-items wrapper
   -- see thru-the-years.js's buildDom()), all spaced out together by
   this single justify-content: space-between, so the label-to-"1" gap
   matches the gap between numbers instead of being its own fixed 8px. */
#thru-the-years .tty-menu {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin-top: 6px;
  padding: 3px 8px;
  /* removed by Claude, 2026-11-14 14:08 -- Tasks_2026-11-14.md Pass #1
  background: rgb(159, 214, 109);
  */
  background: rgb(224, 123, 22); /* added by Claude, 2026-11-14 14:08 */
  border-radius: 4px;
}

#thru-the-years .tty-menu-label {
  flex: 0 0 auto;
  font-weight: bold;
  font-style: italic;
  font-size: 0.7rem;
  /* removed by Claude, 2026-11-03 11:15 -- Round 5: changed to white
  color: #000;
  */
  color: #fff; /* added by Claude, 2026-11-03 11:15 */
}

#thru-the-years .tty-menu-item {
  flex: 0 0 auto;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-size: 0.7rem;
  font-weight: bold;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 1200px) {
  #thru-the-years {
    /* removed by Claude, 2026-11-03 11:40 -- Round 6: "margin: 0 auto"
       was meant to center this item within its flex line, but
       .text-container's flex: 1 (assets/css/index.css) always grows to
       claim whatever space is left over on a shared line, so the auto
       margins never actually had any space to distribute -- the
       carousel kept landing flush against the left edge instead, both
       at "middle" desktop breakpoints and on the iPhone.
    margin: 0 auto 15px auto;
    */
    margin: 0 0 15px 10px; /* added by Claude, 2026-11-03 11:40 -- Round 6: guaranteed 10px left margin instead, regardless of how much of the row .text-container's flex: 1 claims */
    /* removed by Claude, 2026-11-03 11:15 -- Round 5: Jesse asked that
       #thru-the-years (and the caption/arrows/menu that size themselves
       off of it) stay a CONSTANT width across every Bootstrap
       breakpoint, instead of jumping wider here, so the hero text
       wouldn't have to keep re-wrapping as the carousel's width jumped
       around. The Round 3 problem this solved -- long captions wrapping
       -- is now handled a different way (Round 4's full-width
       .tty-title), so it's safe to drop; the base rule's
       width: min(400px, 100%) applies at every breakpoint now.
    width: min(92vw, 600px);
    */
    /* added by Claude, 2026-11-03 11:40 -- Round 6: subtract the new
       10px left margin above so #thru-the-years never totals more than
       100% of the row and triggers horizontal scrolling. */
    width: min(400px, calc(100% - 10px));
  }
}

/* removed by Claude, 2026-11-03 12:05 -- Round 7: this was removing the
   drop shadow any time the browser window narrowed past 1200px, which
   also fires on an ordinary desktop/laptop window, not just phones --
   Jesse noticed the shadow vanishing while just resizing his desktop
   browser. Moved below to the X-Small (phone-width) breakpoint only,
   so it survives every "middle" breakpoint and only drops on an actual
   phone-size screen.
@media (max-width: 1200px) {
  #thru-the-years .tty-frame {
    box-shadow: none;
  }
}
*/
/* added by Claude, 2026-11-03 12:05 -- Round 7 */
@media (max-width: 576px) {
  #thru-the-years .tty-frame {
    box-shadow: none;
  }
}
