/* Taste Buzz changes on top of Ryan's redesign CSS (edit.css). */

/* "What the foodies have to say": each review is a chat bubble. A pink
   quote badge sits on the top-left corner, a tail at the bottom-left points
   down to the reviewer's name, and the review site is on the line below.
   On hover the bubble turns yellow with a pink outline, grows and tilts
   slightly, and gets a gray shadow. */
.tb-testimonial {
  display: flex;
  flex-direction: column;
}
.tb-bubble {
  --bubble-bg: var(--color-white);
  --bubble-border: rgb(42 18 51 / 0.12);
  position: relative;
  flex-grow: 1;
  margin-top: 1.1rem; /* room for the badge above the bubble */
  padding: 1.75rem 1.25rem 1.25rem;
  background-color: var(--bubble-bg);
  border: 2px solid var(--bubble-border);
  border-radius: 1.5rem;
  transition: transform 0.25s ease, background-color 0.2s ease,
    border-color 0.2s ease, box-shadow 0.25s ease;
}
/* Tail: an outer triangle in the border color with a fill-colored triangle
   inside it, so the outline continues around the tail. */
.tb-bubble::before,
.tb-bubble::after {
  content: "";
  position: absolute;
  top: 100%;
  border-style: solid;
  border-right-color: transparent;
  border-bottom-color: transparent;
  border-left-color: transparent;
  transition: border-color 0.2s ease;
}
.tb-bubble::before {
  left: 2rem;
  border-width: 18px 18px 0 0;
  border-top-color: var(--bubble-border);
}
.tb-bubble::after {
  left: calc(2rem + 2px);
  border-width: 13px 13px 0 0;
  border-top-color: var(--bubble-bg);
}
.tb-quote-badge {
  position: absolute;
  top: -1.2rem;
  left: 1.1rem;
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 9999px;
  background-color: var(--color-pink);
  color: var(--color-white);
  font-family: var(--font-poppins);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1;
  padding-top: 0.6rem; /* the quote glyph sits high in its line box */
  box-shadow: 0 0 0 3px var(--color-white); /* ring matches the white section */
}
.tb-attrib {
  display: flex;
  flex-direction: column;
  margin-top: 1.4rem; /* clears the tail */
  padding-left: 1.4rem;
  line-height: 1.3;
}
.tb-attrib-name {
  font-size: 0.95rem;
  font-weight: 700;
}
.tb-attrib-source {
  font-size: 0.8rem;
  color: rgb(42 18 51 / 0.7);
}

@media (hover: hover) {
  .tb-testimonial:hover .tb-bubble {
    --bubble-bg: var(--color-yellow);
    --bubble-border: var(--color-pink);
    z-index: 1;
    transform: scale(1.03) rotate(-1deg);
    box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tb-bubble { transition: background-color 0.2s ease, box-shadow 0.2s ease; }
  .tb-testimonial:hover .tb-bubble { transform: none; }
}

/* Hide "Sign your waiver" in the header, the mobile menu and the footer.
   The links still point at Ryan's demo system. Delete this rule to show
   them again. */
a[href*="/waiver/find"],
li:has(> a[href*="/waiver/find"]) {
  display: none !important;
}

/* Featured image on the "Our food tour adventures" blog cards. */
.tb-post-thumb {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 2px solid rgb(42 18 51 / 0.12);
}

/* Footer "Connect With Us": Facebook, Instagram and YouTube as icons. */
.tb-social {
  display: flex;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 0.35rem;
}
.tb-social a {
  display: inline-flex;
  padding: 0.15rem;
  border-radius: 0.5rem;
  transition: color 0.15s ease, transform 0.15s ease;
}
.tb-social a:hover { transform: translateY(-2px); }
.tb-social svg { display: block; }

/* Food marquee under the hero. The track holds four identical copies of the
   words and moves left by exactly one copy per loop (a quarter of the track),
   at the same speed as before. One copy is about 1,430px wide, so at the loop
   point three copies (about 4,300px) are still to the right of the left edge
   and words are already in place before they scroll into view on any screen
   up to that width. The parent clips the track (overflow: hidden), so the
   page does not get wider. */
.tb-marquee {
  animation: tb-marquee-one-copy 34s linear infinite;
  will-change: transform;
}
@keyframes tb-marquee-one-copy {
  from { transform: translateX(0); }
  to { transform: translateX(-25%); }
}
@media (prefers-reduced-motion: reduce) {
  .tb-marquee { animation: none; }
}

/* "Explore our tours" with its one-line summary right beside it, sharing the
   heading's baseline. On narrow screens the summary wraps under the heading. */
.tb-heading-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 1.25rem;
  row-gap: 0.4rem;
  margin-top: 0.5rem;
}
.tb-heading-row > h2,
.tb-heading-row > p { margin: 0; }

/* One-time nudge on the first testimonial (see /redesign/home.js): the
   bubble takes its hover look and wiggles, then stays highlighted
   (.tb-picked) until the visitor hovers or taps another testimonial. */
.tb-bubble.tb-nudge,
.tb-bubble.tb-nudge-calm,
.tb-bubble.tb-picked {
  --bubble-bg: var(--color-yellow);
  --bubble-border: var(--color-pink);
  z-index: 1;
  box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 0.18);
}
.tb-bubble.tb-nudge {
  animation: tb-bubble-nudge 1.6s ease-in-out both;
}
@keyframes tb-bubble-nudge {
  0% { transform: none; }
  15% { transform: scale(1.03) rotate(-1deg); }
  25% { transform: scale(1.03) rotate(2deg); }
  35% { transform: scale(1.03) rotate(-3deg); }
  45% { transform: scale(1.03) rotate(2deg); }
  55% { transform: scale(1.03) rotate(-2deg); }
  65%, 85% { transform: scale(1.03) rotate(-1deg); }
  100% { transform: none; }
}

/* Newsletter consent checkbox (src/redesign/partials/newsletter.html). */
.tb-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  justify-content: center;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  line-height: 1.45;
  text-align: left;
  color: rgb(42 18 51 / 0.8);
  cursor: pointer;
}
.tb-consent input {
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.1rem;
  accent-color: var(--color-pink);
  cursor: pointer;
}

.tb-bubble.tb-picked {
  transform: scale(1.03) rotate(-1deg);
}
@media (prefers-reduced-motion: reduce) {
  .tb-bubble.tb-picked { transform: none; }
}
