/* Teddy's Place Guestbook — typography-led roll call. */
.tp-guestbook{
  color:var(--tp-gb-color,#B6402F);
  font-family:var(--tp-gb-font,"Source Sans 3"),sans-serif;
  font-size:var(--tp-gb-fs-d,22px);
  font-weight:var(--tp-gb-weight,700);
  line-height:var(--tp-gb-lh-d,2.35);
  letter-spacing:var(--tp-gb-ls,0);
  text-align:var(--tp-gb-align,left);
  text-transform:var(--tp-gb-case,uppercase);
  width:100%;
}

/* Each guest and its following divider are one unbreakable unit. The browser
   can wrap between entries, but never through a name such as CAMERA CENTRE UK. */
.tp-guestbook__entry{
  display:inline-flex;
  align-items:baseline;
  white-space:nowrap;
  vertical-align:baseline;
}
.tp-guestbook__name{white-space:nowrap;}
.tp-guestbook__divider{
  color:var(--tp-gb-divider,#B6402F);
  display:inline-block;
  flex:0 0 auto;
  margin-inline:var(--tp-gb-space-d,12px);
}

@media(max-width:1024px){
  .tp-guestbook{font-size:var(--tp-gb-fs-t,20px);line-height:var(--tp-gb-lh-t,2.1)}
  .tp-guestbook__divider{margin-inline:var(--tp-gb-space-t,10px)}
}
@media(max-width:640px){
  .tp-guestbook{font-size:var(--tp-gb-fs-m,18px);line-height:var(--tp-gb-lh-m,1.9)}
  .tp-guestbook__divider{margin-inline:var(--tp-gb-space-m,8px)}
}

/* Justify all lines — balanced by the companion layout script.
   JS chooses visually balanced line breaks for the current width, then each
   generated row distributes its names evenly. Separators live BETWEEN names,
   never at the right edge of a row. This avoids both the desktop “bullet wall”
   and the huge arbitrary mobile gaps caused by raw flex-wrap/space-between. */
.tp-guestbook[style*="--tp-gb-align:justify-all"]{
  display:block;
  text-align:left;
}
.tp-guestbook__row{
  display:flex;
  width:100%;
  align-items:baseline;
  justify-content:space-between;
  white-space:nowrap;
}
.tp-guestbook__row + .tp-guestbook__row{
  margin-top:calc((var(--tp-gb-lh-d,2.35) - 1) * 1em);
}
.tp-guestbook__row-item{
  display:inline-flex;
  align-items:baseline;
  white-space:nowrap;
  flex:0 0 auto;
}
.tp-guestbook__row-divider{
  color:var(--tp-gb-divider,#B6402F);
  display:inline-block;
  flex:0 0 auto;
  margin-inline:var(--tp-gb-space-d,12px);
}
/* A single unavoidable long name cannot mathematically be justified without
   distorting its typography, so it stays naturally left aligned. */
.tp-guestbook__row--single{justify-content:flex-start;}
@media(max-width:1024px){
  .tp-guestbook__row + .tp-guestbook__row{margin-top:calc((var(--tp-gb-lh-t,2.1) - 1) * 1em)}
  .tp-guestbook__row-divider{margin-inline:var(--tp-gb-space-t,10px)}
}
@media(max-width:640px){
  .tp-guestbook__row + .tp-guestbook__row{margin-top:calc((var(--tp-gb-lh-m,1.9) - 1) * 1em)}
  .tp-guestbook__row-divider{margin-inline:var(--tp-gb-space-m,8px)}
}

/* v1.0.25 mobile editorial justification: the JS may locally reorder nearby
   guests for a cleaner fit. Use the configured mobile line-height as the TOTAL
   row rhythm rather than inheriting line-height and then adding it again. */
@media(max-width:640px){
  .tp-guestbook[style*="--tp-gb-align:justify-all"] .tp-guestbook__row{
    line-height:1;
  }
  .tp-guestbook[style*="--tp-gb-align:justify-all"] .tp-guestbook__row + .tp-guestbook__row{
    margin-top:calc((var(--tp-gb-lh-m,1.9) - 1) * 1em);
  }
}
