/*
 * Bottle stage — pairs with app/views/shared/_bottle_stage.html.erb.
 * The bottle photo on a tinted panel, a pill top left (a shelf reason or a
 * price gap) and the best critic score top right. Used by shared/_wine_tile
 * (home page) and the landing-page example cards.
 *
 * Pill colours reuse the markup cell's AA-safe mixes (components/_markup.css):
 * red and green pulled toward --color-text so they read on both themes.
 */
.bottle-stage {
  position: relative;
  height: 12rem;
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: color-mix(in srgb, var(--color-primary) 4%, var(--color-surface));
}

.bottle-stage--large {
  height: 17rem;
  padding-bottom: var(--space-lg);
}

.bottle-stage-img {
  max-width: 70%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
}

/* Multiply melts a photo's white backdrop into the tinted stage. On the dark
   stage it would black the bottle out instead, so it is light-theme only, and
   the backdrop is rounded off to read as a photo card rather than a hard box. */
[data-theme="dark"] .bottle-stage-img {
  mix-blend-mode: normal;
  border-radius: var(--radius-sm);
}

.bottle-stage-monogram {
  align-self: center;
  width: 4.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: var(--font-wine-name);
  font-size: var(--font-size-2xl);
  font-weight: 600;
  background: color-mix(in srgb, var(--wine-tile-color, var(--color-primary)) 16%, var(--color-surface));
  color: var(--wine-tile-color, var(--color-primary));
}

.bottle-stage-pill {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.3;
  max-width: calc(100% - 6rem);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottle-stage-pill--reason { color: var(--color-primary); }
.bottle-stage-pill--good { color: color-mix(in srgb, var(--color-success) 60%, var(--color-text)); }
.bottle-stage-pill--bad { color: color-mix(in srgb, var(--color-danger) 85%, var(--color-text)); }
.bottle-stage-pill--even { color: var(--color-text-light); }

.bottle-stage-score {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  text-align: center;
  line-height: 1.1;
}

.bottle-stage-score-value {
  display: block;
  font-size: var(--font-size-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.bottle-stage-score-by {
  display: block;
  font-size: var(--font-size-2xs);
  letter-spacing: 0.06em;
  color: var(--color-text-light);
}
