/* Nuggets showcase — additional looks (highlight, bubble, editorial, spotlight, sticky).
   Loaded after nuggets.css only when one of these layouts is used. Every section is
   scoped under .yayrev-nuggets--{layout}; the card markup is the same for all of them
   (see templates/widgets/nuggets/showcase.php), so each look only restyles the shared
   __item / __quote / __content / __meta blocks and, for the slider family, reuses the
   base slider track + nav.

   Tokens: --yayrev-nugget-bg (card/bubble/paper; ignored by highlight + editorial),
   --yayrev-nugget-text (text + stars), --yayrev-nugget-accent (marker / bubble border
   + tail / hairlines / spotlight frame / tape), --yayrev-nugget-cols. */

/* ------------------------------------------------------------------ */
/* Shared — rules several looks have in common. Per-look sections below */
/* only carry what makes each one different.                            */
/* ------------------------------------------------------------------ */

/* Only the minimal card and spotlight keep the big serif quote glyph. */
.yayrev-nuggets--highlight .yayrev-nuggets__quote,
.yayrev-nuggets--bubble .yayrev-nuggets__quote,
.yayrev-nuggets--editorial .yayrev-nuggets__quote,
.yayrev-nuggets--sticky .yayrev-nuggets__quote {
  display: none;
}

/* Masonry-flow looks (variable-height items in CSS columns). */
.yayrev-nuggets--highlight .yayrev-nuggets__track,
.yayrev-nuggets--bubble .yayrev-nuggets__track {
  columns: var(--yayrev-nugget-cols);
  column-gap: 28px;
}

.yayrev-nuggets--highlight .yayrev-nuggets__item,
.yayrev-nuggets--bubble .yayrev-nuggets__item {
  break-inside: avoid;
}

/* Single-card looks reuse the base slider mechanics (translated flex track). */
.yayrev-nuggets--editorial .yayrev-nuggets__track,
.yayrev-nuggets--spotlight .yayrev-nuggets__track {
  display: flex;
  transition: transform 0.35s ease;
}

.yayrev-nuggets--editorial .yayrev-nuggets__item,
.yayrev-nuggets--spotlight .yayrev-nuggets__item {
  flex: 0 0 100%;
  min-width: 0;
}

/* Column-based looks run narrow: let the author unit drop under the stars
   instead of breaking "First Last" across lines. */
.yayrev-nuggets--highlight .yayrev-nuggets__meta,
.yayrev-nuggets--bubble .yayrev-nuggets__meta,
.yayrev-nuggets--sticky .yayrev-nuggets__meta {
  flex-wrap: wrap;
  row-gap: 8px;
}

.yayrev-nuggets--highlight .yayrev-nuggets__author,
.yayrev-nuggets--bubble .yayrev-nuggets__author,
.yayrev-nuggets--sticky .yayrev-nuggets__author {
  white-space: nowrap;
}

/* ------------------------------------------------------------------ */
/* Highlight — marker-pen wall. No card; the excerpt itself carries an  */
/* accent highlight, line by line, like the admin's nugget selection.   */
/* ------------------------------------------------------------------ */
.yayrev-nuggets--highlight .yayrev-nuggets__item {
  background: none;
  border-radius: 0;
  padding: 4px 0 24px;
}

/* Inline so the highlight wraps each line (box-decoration-break), not the whole box.
   The default accent (#686868) is far too dark to sit behind body text, so the
   marker is a 35% tint of the accent; a bright accent still reads as a full marker.
   The plain-accent declaration before it is the fallback for browsers without color-mix. */
.yayrev-nuggets--highlight .yayrev-nuggets__content {
  display: inline;
  margin: 0;
  padding: 0.08em 0.35em;
  font-size: 22px;
  line-height: 1.65;
  background: var(--yayrev-nugget-accent);
  background: color-mix(in srgb, var(--yayrev-nugget-accent) 35%, transparent);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.yayrev-nuggets--highlight .yayrev-nuggets__meta {
  margin-top: 14px;
}

/* ------------------------------------------------------------------ */
/* Bubble — the excerpt <p> is the speech bubble (border, tail); stars,  */
/* reviewer and product line flow underneath it like a chat sender.     */
/* Everything stays in normal flow: absolutely positioned children get   */
/* fragmented by the multi-column track, so the author row can't hang    */
/* off the item via position:absolute.                                   */
/* ------------------------------------------------------------------ */
.yayrev-nuggets--bubble .yayrev-nuggets__item {
  background: none;
  border-radius: 0;
  padding: 0 0 28px;
}

.yayrev-nuggets--bubble .yayrev-nuggets__content {
  position: relative;
  margin: 0;
  padding: 18px 20px;
  background: var(--yayrev-nugget-bg);
  border: 2px solid var(--yayrev-nugget-accent);
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
}

.yayrev-nuggets--bubble .yayrev-nuggets__content::after {
  content: "";
  position: absolute;
  left: 22px;
  bottom: -11px;
  width: 18px;
  height: 18px;
  background: var(--yayrev-nugget-bg);
  border-right: 2px solid var(--yayrev-nugget-accent);
  border-bottom: 2px solid var(--yayrev-nugget-accent);
  transform: rotate(45deg);
}

.yayrev-nuggets--bubble .yayrev-nuggets__meta {
  margin-top: 20px;
  padding-left: 12px;
}

.yayrev-nuggets--bubble .yayrev-nuggets__product,
.yayrev-nuggets--bubble .yayrev-nuggets__store {
  margin-top: 8px;
  margin-left: 12px;
}

/* ------------------------------------------------------------------ */
/* Editorial — one big serif pull-quote at a time, hairline rules,      */
/* small-caps attribution, transparent background.                     */
/* ------------------------------------------------------------------ */
.yayrev-nuggets--editorial {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
}

.yayrev-nuggets--editorial .yayrev-nuggets__item {
  background: none;
  border-radius: 0;
  border-top: 1px solid var(--yayrev-nugget-accent);
  border-bottom: 1px solid var(--yayrev-nugget-accent);
  padding: 36px 24px 28px;
  text-align: center;
}

.yayrev-nuggets--editorial .yayrev-nuggets__content {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.35;
}

.yayrev-nuggets--editorial .yayrev-nuggets__meta {
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  margin-top: 22px;
}

.yayrev-nuggets--editorial .yayrev-nuggets__reviewer {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.8;
}

.yayrev-nuggets--editorial .yayrev-nuggets__product,
.yayrev-nuggets--editorial .yayrev-nuggets__store {
  display: flex;
  justify-content: center;
}

/* Nav sits centred under the quote instead of overlaying a card corner. */
.yayrev-nuggets--editorial .yayrev-nuggets__nav {
  position: static;
  justify-content: center;
  gap: 28px;
  margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Spotlight — split card: product image (or an initial tile) on the   */
/* left, quote on the right. Stacks when the widget itself is narrow.   */
/* ------------------------------------------------------------------ */
.yayrev-nuggets--spotlight {
  position: relative;
  max-width: 640px;
  overflow: hidden;
  border-radius: 12px;
  container-type: inline-size;
}

.yayrev-nuggets--spotlight .yayrev-nuggets__item {
  display: grid;
  grid-template-columns: 40% minmax(0, 1fr);
  align-content: start;
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
}

.yayrev-nuggets--spotlight .yayrev-nuggets__media {
  position: relative;
  grid-column: 1;
  grid-row: 1 / span 6; /* spans every text row: quote, content, meta, topics, product */
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yayrev-nugget-accent);
}

.yayrev-nuggets--spotlight .yayrev-nuggets__media-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.yayrev-nuggets--spotlight .yayrev-nuggets__media-tile {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yayrev-nugget-bg);
  color: var(--yayrev-nugget-accent);
  font-size: 28px;
  font-weight: 700;
}

/* Text column: every non-media child lives in column 2 with the card's inner gutter. */
.yayrev-nuggets--spotlight .yayrev-nuggets__item > :not(.yayrev-nuggets__media) {
  grid-column: 2;
  margin-left: 24px;
  margin-right: 24px;
}

.yayrev-nuggets--spotlight .yayrev-nuggets__quote {
  padding-top: 26px;
  font-size: 36px;
}

.yayrev-nuggets--spotlight .yayrev-nuggets__item > :last-child:not(.yayrev-nuggets__media) {
  margin-bottom: 24px;
}

/* Keep the nav clear of the product/store line at the bottom of the text column. */
.yayrev-nuggets--spotlight .yayrev-nuggets__nav {
  top: 12px;
  bottom: auto;
}

@container (max-width: 520px) {
  .yayrev-nuggets--spotlight .yayrev-nuggets__item {
    grid-template-columns: minmax(0, 1fr);
  }

  .yayrev-nuggets--spotlight .yayrev-nuggets__media {
    grid-row: 1;
    min-height: 160px;
  }

  .yayrev-nuggets--spotlight .yayrev-nuggets__item > :not(.yayrev-nuggets__media) {
    grid-column: 1;
  }
}

/* ------------------------------------------------------------------ */
/* Sticky — paper notes with a tape strip and a slight tilt per card.   */
/* ------------------------------------------------------------------ */
.yayrev-nuggets--sticky .yayrev-nuggets__track {
  display: grid;
  grid-template-columns: repeat(var(--yayrev-nugget-cols), minmax(0, 1fr));
  gap: 32px;
  align-items: start; /* notes size to their text instead of stretching to the row */
  padding: 14px 12px 20px; /* breathing room so tilted corners aren't clipped */
}

.yayrev-nuggets--sticky .yayrev-nuggets__item {
  position: relative;
  border-radius: 2px;
  padding: 32px 22px 22px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14), 0 2px 4px rgba(0, 0, 0, 0.08);
  transform: rotate(-2deg);
  transition: transform 0.2s ease;
}

.yayrev-nuggets--sticky .yayrev-nuggets__item:nth-child(3n + 2) {
  transform: rotate(1.5deg);
}

.yayrev-nuggets--sticky .yayrev-nuggets__item:nth-child(3n) {
  transform: rotate(-1deg);
}

.yayrev-nuggets--sticky .yayrev-nuggets__item:hover {
  transform: rotate(0) scale(1.02);
}

/* Tape strip */
.yayrev-nuggets--sticky .yayrev-nuggets__item::before {
  content: "";
  position: absolute;
  top: -10px;
  left: 50%;
  width: 90px;
  height: 22px;
  transform: translateX(-50%) rotate(-2deg);
  background: var(--yayrev-nugget-accent);
  opacity: 0.55;
}

.yayrev-nuggets--sticky .yayrev-nuggets__content {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.45;
}

.yayrev-nuggets--sticky .yayrev-nuggets__meta {
  margin-top: 12px;
}

/* ------------------------------------------------------------------ */
/* Mobile — every column-based look collapses to one column.           */
/* ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .yayrev-nuggets--highlight .yayrev-nuggets__track,
  .yayrev-nuggets--bubble .yayrev-nuggets__track {
    columns: 1;
  }

  .yayrev-nuggets--sticky .yayrev-nuggets__track {
    grid-template-columns: 1fr;
  }
}
