/* TTV Amazon Live (UK). Product photo block, live price line, inline live prices and the Amazon notices. */

figure.ttv-product-photo {
  max-width: var(--wp--style--global--content-size, 800px);
  margin: 1.25rem auto;
  text-align: center;
}
figure.ttv-product-photo a { display: inline-block; line-height: 0; }
figure.ttv-product-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(320px, 100%);
  max-height: 320px;
  margin: 0 auto;
  padding: 12px;
  background: #fff;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 10px;
  object-fit: contain;
  /* some theme/lazy-load rules leave images at opacity 0 until their own script marks them loaded */
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
}
figure.ttv-product-photo figcaption {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  opacity: 0.7;
}

/* live price line under a product photo */
figure.ttv-product-photo .ttv-live-price {
  margin: 0.6rem auto 0;
  max-width: 420px;
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.6rem;
  justify-content: center;
  align-items: baseline;
  font-size: 0.9rem;
  line-height: 1.35;
}
figure.ttv-product-photo .ttv-lp-price { font-size: 1.05rem; }
figure.ttv-product-photo .ttv-lp-price.is-out { color: #b3261e; }
figure.ttv-product-photo .ttv-lp-stock { color: #1b7a3a; font-weight: 600; }
figure.ttv-product-photo .ttv-lp-stock.is-scarce { color: #b35a00; }
figure.ttv-product-photo .ttv-lp-seller { opacity: 0.85; }
figure.ttv-product-photo .ttv-lp-asof { opacity: 0.75; }
figure.ttv-product-photo .ttv-lp-disc { flex-basis: 100%; font-size: 0.75rem; opacity: 0.65; }

/* inline live price (prose, verdict cards, table cells): small stamp after the price; inside a table cell it
   drops to its own line so a narrow column or a 390px phone never wraps the price itself */
.ttv-amz-price.is-live .ttv-amz-asof {
  display: inline;
  margin-left: 0.35em;
  font-size: 0.72em;
  font-weight: 400;
  opacity: 0.7;
}
td .ttv-amz-price.is-live .ttv-amz-asof,
th .ttv-amz-price.is-live .ttv-amz-asof {
  display: block;
  margin-left: 0;
  line-height: 1.25;
  white-space: nowrap;
}

/* Amazon's required notices at the end of the article */
.ttv-amz-credit {
  margin: 1.5rem 0 0;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  font-size: 0.75rem;
  line-height: 1.4;
  opacity: 0.7;
}
.ttv-amz-credit p { margin: 0 0 0.4rem; font-size: inherit; }
