/*
 * Tributes (includes/tributes.inc.php): the row of 10 icons under a poem's
 * reactions on read_poetry.php, and the "Tributes received" shelf on
 * profile.php, users.php and the poet card. Self-contained: its own colours,
 * scoped under .pvt / .pvt-*, so it works next to read_poetry.css, users.css
 * and profile.css alike. Mockup: docs/mockups/read-poetry-tributes.html.
 */

.pvt, .pvt-shelf, .pvt-shelf__lede, .pvt-rankline, .pvt-credit {
  --pvt-gold: #d3b06b;
  --pvt-gold-deep: #947113;
  --pvt-gold-bright: #ffcc2f;
  --pvt-line: #303030;
  --pvt-muted: #a8a8a8;
  font-family: Helvetica, Verdana, Arial, sans-serif;
  text-align: left;
}

/* ---- The row on a poem ------------------------------------------------- */
.pvt { margin: 0 0 16px; padding: 0 0 16px; border-bottom: 1px solid var(--pvt-line); color: #fff; }
.pvt__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.pvt h3.pvt__title {
  margin: 0; padding: 0; border: 0; background: none;
  font: 700 11px Helvetica, Verdana, Arial, sans-serif; letter-spacing: 1px; text-transform: uppercase; color: var(--pvt-muted);
}
.pvt p.pvt__total { margin: 0; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--pvt-muted); }
.pvt__total strong { color: var(--pvt-gold-bright); }
.pvt ul.pvt__list {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 10px;
  justify-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pvt__list li { width: 100%; max-width: 56px; margin: 0; padding: 0; list-style: none; }
.pvt p.pvt__say { min-height: 18px; margin: 10px 0 0; font-size: 12px; color: var(--pvt-muted); }
.pvt__say strong { color: #fff; }

/* ---- One icon: a perfect circle with a thin ring ------------------------- */
.pvt-icon {
  --pvt-ring: #ffcc2f;
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 6px;
  border: 1px solid #4a4a4a;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 40%, #262626, #0e0e0e 72%);
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: border-color .25s, background .35s, box-shadow .35s, transform .15s;
}
span.pvt-icon { cursor: default; }
.pvt-icon__art { position: relative; display: block; width: 100%; height: 100%; }
.pvt-icon__art img {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(1) brightness(1.25) contrast(.85);
  opacity: .62;
  transition: filter .45s, opacity .45s;
}
button.pvt-icon:hover, a.pvt-icon:hover { border-color: #8a8a8a; }
button.pvt-icon:hover .pvt-icon__art img, a.pvt-icon:hover .pvt-icon__art img { opacity: .8; }
button.pvt-icon:active { transform: scale(.94); }
.pvt-icon:focus-visible { outline: 2px solid #ffcc2f; outline-offset: 3px; }
button.pvt-icon[disabled] { cursor: progress; }

/* Received at least once: full colour, the ring takes the icon's accent. */
.pvt-icon.is-given {
  border-color: var(--pvt-ring);
  background: radial-gradient(circle at 50% 40%, #2a2a2a, #0b0b0b 74%);
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--pvt-ring) 26%, #151515), #0b0b0b 74%);
  box-shadow: 0 0 12px rgba(255, 204, 47, .25);
  box-shadow: 0 0 12px color-mix(in srgb, var(--pvt-ring) 35%, transparent);
}
.pvt-icon.is-given .pvt-icon__art img { filter: none; opacity: 1; }

/* Given by you: brighter ring and a tick on the top-left edge. */
.pvt-icon.is-mine { box-shadow: 0 0 0 1px var(--pvt-ring), 0 0 14px color-mix(in srgb, var(--pvt-ring) 55%, transparent); }
.pvt-icon__mine {
  position: absolute; left: -4px; top: -4px;
  box-sizing: border-box; width: 16px; height: 16px;
  border: 2px solid #000; border-radius: 50%;
  background: #fff; color: #000; font: 700 10px/12px Helvetica, Arial, sans-serif; text-align: center;
}

/* VIP-only, seen by a member who isn't VIP. */
.pvt-icon__lock {
  position: absolute; left: 50%; top: -7px; transform: translateX(-50%);
  padding: 0 4px; border: 1px solid #947113; border-radius: 3px;
  background: #000; color: #d3b06b; font: 700 8px/12px Helvetica, Arial, sans-serif; letter-spacing: .5px;
}
.pvt-icon.is-locked { cursor: help; }

/* The count bubble on the bottom-right edge. */
.pvt-icon__count {
  position: absolute; right: -5px; bottom: -3px;
  box-sizing: border-box; min-width: 20px; height: 20px; padding: 0 5px;
  border: 2px solid #000; border-radius: 10px;
  background: #ffcc2f; color: #000;
  font: 700 11px/16px Helvetica, Verdana, Arial, sans-serif; text-align: center;
}
.pvt-icon__count[hidden], .pvt-icon__mine[hidden], .pvt-icon__lock[hidden] { display: none; }

/* "Stack of gold": three coins in one circle. */
.pvt-stack img { position: absolute; width: 60%; height: 60%; }
.pvt-stack img:nth-child(1) { left: 0;   top: 38%; }
.pvt-stack img:nth-child(2) { left: 40%; top: 38%; }
.pvt-stack img:nth-child(3) { left: 20%; top: 4%; }

/* The "Go VIP" prompt. */
.pvt__vip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 10px; padding: 10px 12px;
  border: 1px solid var(--pvt-gold-deep); border-left-width: 6px; border-radius: 6px;
  background: rgba(204, 173, 108, .1); font-size: 12px; color: #e6e6e6;
}
.pvt__vip[hidden] { display: none; }
.pvt__vip strong { color: var(--pvt-gold-bright); }
.pvt a.pvt__go {
  display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px;
  border-left: 6px solid #947113; border-radius: 4px; background: #ccad6c;
  color: #000; font-weight: 700; font-size: 12px; text-transform: uppercase; text-decoration: none;
}
.pvt a.pvt__go:hover { background: #ffcc2f; color: #000; }

/* Click feedback. */
@keyframes pvt-pop { 0% { transform: scale(1); } 40% { transform: scale(1.14); } 100% { transform: scale(1); } }
@keyframes pvt-bump { 0% { transform: scale(.4); } 60% { transform: scale(1.25); } 100% { transform: scale(1); } }
.pvt-icon.is-popping { animation: pvt-pop .35s ease-out; }
.pvt-icon.is-popping .pvt-icon__count { animation: pvt-bump .35s ease-out; }
@media (prefers-reduced-motion: reduce) {
  .pvt-icon, .pvt-icon__art img { transition: none; }
  .pvt-icon.is-popping, .pvt-icon.is-popping .pvt-icon__count { animation: none; }
}

/* ---- "Tributes received" shelf ------------------------------------------- */
p.pvt-shelf__lede { margin: 0 0 14px; font-size: 13px; color: #dcdcdc; }
.pvt-shelf__lede strong { color: var(--pvt-gold-bright); }
ul.pvt-shelf {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 10px;
  margin: 0; padding: 0; list-style: none;
}
.pvt-shelf li { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; text-align: center; }
.pvt-shelf .pvt-icon { width: 52px; }
.pvt-shelf__name { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--pvt-muted); }
.pvt-shelf__name--vip { color: var(--pvt-gold); }
ul.pvt-shelf--compact { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); }
.pvt-shelf--compact .pvt-icon { width: 40px; padding: 4px; }
.pvt-shelf--compact .pvt-shelf__name { display: none; }
.pvt-rankline { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pvt-rankline div { flex: 1 1 120px; padding: 10px; border-radius: 6px; background: #1a1a1a; text-align: center; }
.pvt-rankline strong { display: block; font-size: 18px; color: #fff; }
.pvt-rankline span { display: block; margin-top: 2px; font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--pvt-muted); }
p.pvt-credit { margin: 12px 0 0; font-size: 10px; color: #777; }
.pvt-credit a { color: #999; }

/* Phones: two rows of five. */
@media (max-width: 560px) {
  .pvt ul.pvt__list { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px 10px; }
  .pvt__list li { max-width: 60px; }
  ul.pvt-shelf { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .pvt-shelf .pvt-icon { width: 44px; }
}
