/* Voices Heard listening player: full-screen dialog opened from the
   Community Wall's LISTEN button. Square corners and white outlines to
   match the rest of the wall. */
/* One shared color clock: the tab underline and the plus button both read
   --vp-cycle, so they always show the same color at the same moment. */
@property --vp-cycle { syntax: "<color>"; inherits: true; initial-value: #fb2f7b; }
.vp { animation: vp-cycle 12s linear infinite; }
@keyframes vp-cycle {
  0%, 100% { --vp-cycle: #fb2f7b; }  /* pink */
  17%      { --vp-cycle: #ff9a3c; }  /* orange */
  33%      { --vp-cycle: #ffdc00; }  /* yellow */
  50%      { --vp-cycle: #a8e000; }  /* green */
  67%      { --vp-cycle: #00cde8; }  /* cyan */
  83%      { --vp-cycle: #3d5bff; }  /* blue */
}
@media (prefers-reduced-motion: reduce) { .vp { animation: none; } }
.vp[hidden] { display: none; }
@media (max-width: 899.98px) { .vp { background: #000; } }
.vp {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(8, 9, 10, .72);
  display: flex; align-items: stretch; justify-content: center;
}
.vp__panel {
  --vp-accent: var(--cw-color-accent, #fb2f7b);
  position: relative;
  width: min(100%, 560px);
  background: #000;
  color: var(--color-text);
  display: flex; flex-direction: column;
  overflow: hidden;
  padding: 0;
  outline: none;
}
.vp__panel[data-role="create"] { --vp-accent: var(--cw-color-create); }
.vp__panel[data-role="build"] { --vp-accent: var(--cw-color-build); }
.vp__panel[data-role="fund"] { --vp-accent: var(--cw-color-fund); }
.vp__panel[data-role="support"] { --vp-accent: var(--cw-color-support); }

.vp__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.vp__banner { position: relative; flex: none; background: #000; padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px; }
.vp__banner-art {
  /* Transparent logo with its own soft glow; oversized so the lettering reads
     large, with its empty margins trimmed and any overflow clipped by the panel. */
  aspect-ratio: 2.5;
  width: 114%; max-width: 580px; margin: -6px 0 -14px;
  position: relative; left: 50%; transform: translateX(-50%);
  background: var(--vp-art) center / contain no-repeat;
}
/* Small close mark, top right, the same plain × as the sign-up modal's. */
.vp__close {
  position: absolute; z-index: 2;
  top: calc(8px + env(safe-area-inset-top, 0px)); right: 8px;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; color: var(--color-text); cursor: pointer;
  font-size: 1.5rem; line-height: 1;
}
.vp__close:focus-visible { outline: 2px solid var(--color-text); outline-offset: -4px; }
.vp__total-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -26px; position: relative; z-index: 1; }
.vp__total { margin: 0; display: flex; align-items: baseline; gap: 12px; line-height: 1; }
.vp__plus {
  position: relative; flex: none; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 0; border-radius: 50%; cursor: pointer; color: #08090a;
  background: var(--vp-cycle, #fb2f7b);
  box-shadow: 0 0 10px var(--vp-cycle, #fb2f7b), 0 0 22px color-mix(in srgb, var(--vp-cycle, #fb2f7b) 60%, transparent);
  transition: transform .18s ease;
}
/* Keeps a 44px tap target around the smaller visible circle. */
.vp__plus::before { content: ""; position: absolute; inset: -4px; border-radius: 50%; }
.vp__plus svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
@media (hover: hover) and (pointer: fine) { .vp__plus:hover { transform: scale(1.1); } }
.vp__plus:focus-visible { outline: 2px solid var(--color-text); outline-offset: 3px; }
.vp__total-num { font-family: var(--font-digital, monospace); font-size: 2.2rem; font-weight: 700; letter-spacing: .05em; font-variant-numeric: tabular-nums; color: #fff; text-shadow: var(--digital-glow, none); }
.vp__total-label { font-size: .72rem; font-weight: 800; letter-spacing: .12em; color: var(--color-text-muted); }
.vp__tabs { flex: none; padding: 0 16px; background: #000; border-top: 1px solid rgba(243,243,244,.3); }
.vp__scroll { touch-action: pan-y pinch-zoom; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 16px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }

.vp__icon-btn, .vp__play {
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; color: var(--color-text); cursor: pointer;
  width: 44px; height: 44px; padding: 0;
}
.vp__icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: square; }
.vp__icon-btn svg.vp__fill, .vp__play svg { fill: currentColor; stroke: none; }
.vp__icon-btn[aria-pressed="true"] { color: var(--vp-accent); }
.vp__play { width: 68px; height: 68px; background: var(--color-text); color: var(--color-bg); border-radius: 50%; }
.vp__play svg { width: 30px; height: 30px; }
.vp__icon-btn:focus-visible, .vp__play:focus-visible, .vp__tile:focus-visible, .vp__queue-item button:focus-visible {
  outline: 2px solid var(--color-text); outline-offset: 3px;
}

.vp__status { margin: 8px 16px 0; text-align: center; color: var(--color-text-muted); font-size: .9rem; }

.vp__id { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 14px; align-items: start; margin-bottom: 14px; }
.vp__art {
  width: 104px; aspect-ratio: 1;
  border: 1px solid var(--color-card-border);
  background: radial-gradient(circle at 30% 25%, var(--vp-accent), color-mix(in srgb, var(--vp-accent) 30%, #08090a) 70%);
  background-size: cover; background-position: center;
  display: flex; align-items: flex-end; justify-content: center; padding-bottom: 8px; gap: 3px;
}
.vp__art-bar { width: 4px; height: 14%; background: rgba(8,9,10,.55); transform-origin: bottom; }
.vp.is-playing .vp__art-bar { animation: vp-bar .9s ease-in-out infinite alternate; }
.vp__art-bar:nth-child(2n) { animation-delay: -.3s; } .vp__art-bar:nth-child(3n) { animation-delay: -.6s; }
@keyframes vp-bar { from { height: 12%; } to { height: 62%; } }

.vp__meta { min-width: 0; }
.vp__role-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 6px; }
.vp__num { padding: 1px 8px; border: 1px solid var(--vp-accent); color: var(--vp-accent); font-family: var(--font-digital, monospace); font-size: .8rem; font-weight: 700; letter-spacing: .08em; line-height: 1.5; }
.vp__role { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .12em; color: var(--vp-accent); }
.vp__artist { margin: 0; font-size: 1.3rem; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }
.vp__links { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.vp__link { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--color-text); text-decoration: none; font-size: .9rem; }
.vp__link svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; }
.vp__link:focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; }
.vp__track { margin: 0 0 12px; font-size: 1.35rem; line-height: 1.2; font-weight: 800; overflow-wrap: anywhere; }

.vp__range { width: 100%; height: 20px; margin: 0; background: transparent; accent-color: var(--vp-accent); cursor: pointer; }
.vp__times { display: flex; justify-content: space-between; font-size: .75rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.vp__controls { display: flex; align-items: center; justify-content: center; gap: 44px; margin: 12px 0 28px; }

.vp__section-title { margin: 0 0 10px; font-size: .8rem; letter-spacing: .12em; font-weight: 800; }
.vp__tabs { display: flex; border-bottom: 1px solid rgba(243,243,244,.3); }
.vp__tab {
  flex: 1; min-height: 44px; background: transparent; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px;
  color: var(--color-text-muted); font: inherit; font-size: .8rem; font-weight: 800; letter-spacing: .12em; cursor: pointer;
}
.vp__tab.is-active { color: var(--color-text); border-bottom-color: var(--color-text); }
.vp__tab:focus-visible { outline: 2px solid var(--color-text); outline-offset: -2px; }
.vp__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.vp__chip {
  min-height: 36px; padding: 6px 12px; background: transparent; color: var(--color-text); cursor: pointer;
  border: 1px solid rgba(243,243,244,.45); font: inherit; font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}
.vp__chip[aria-pressed="true"] { background: var(--color-text); color: var(--color-bg); border-color: var(--color-text); }
.vp__chip:focus-visible { outline: 2px solid var(--color-text); outline-offset: 2px; }
.vp__written-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.vp__written-card { padding: 14px; border: 1px solid rgba(243,243,244,.3); border-left: 4px solid var(--card-accent, #888); }
.vp__written-role { margin: 0 0 6px; font-size: .7rem; font-weight: 800; letter-spacing: .12em; color: var(--card-accent, inherit); }
.vp__written-title { margin: 0 0 6px; font-size: 1rem; font-weight: 800; }
.vp__written-quote { margin: 0; line-height: 1.45; overflow-wrap: anywhere; }
.vp__written-name { margin: 8px 0 0; font-size: .85rem; color: var(--color-text-muted); }
.vp__written-empty { color: var(--color-text-muted); font-size: .9rem; }
.vp__queue-list { list-style: none; margin: 0; padding: 0; }
.vp__queue-item button {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; width: 100%;
  padding: 8px 0; background: transparent; border: 0; border-top: 1px solid rgba(243,243,244,.14);
  color: inherit; font: inherit; text-align: left; cursor: pointer;
}
.vp__queue-item.is-current button .vp__q-title { color: var(--vp-accent); }
.vp__q-thumb { width: 44px; height: 44px; background: var(--q-color, #666) center / cover; border: 1px solid rgba(243,243,244,.3); }
.vp__q-title { display: block; font-weight: 700; font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp__q-sub { display: block; font-size: .8rem; color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vp__q-dur { font-size: .8rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }

.vp__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vp__tile {
  position: relative; aspect-ratio: 1; padding: 0; text-align: left; cursor: pointer; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end; isolation: isolate;
  border: 1px solid var(--color-card-border); color: #fff; font: inherit; background: #000;
}
.vp__cover { position: absolute; inset: 0; z-index: -2; display: grid; grid-template: 1fr 1fr / 1fr 1fr; }
.vp__cover.is-single { grid-template: 1fr / 1fr; }
.vp__cover.is-single .vp__cover-cell:not(:first-child) { display: none; }
.vp__cover-cell { background-size: cover; background-position: center; background-repeat: no-repeat; }
/* Darkens the lower part of the cover so the album name stays readable. */
.vp__tile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, transparent 38%, rgba(0,0,0,.88) 100%); }
.vp__tile-name, .vp__tile-count { position: relative; padding-inline: 12px; }
.vp__tile-name { display: block; font-size: 1.05rem; font-weight: 900; line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.vp__tile-count { padding-top: 4px; padding-bottom: 12px; font-size: .75rem; font-weight: 700; color: rgba(255,255,255,.82); }

@media (min-width: 900px) {
  .vp { align-items: center; padding: 24px; }
  .vp__panel { height: min(900px, 100%); border: 1px solid var(--color-card-border); }
  .vp__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  .vp.is-playing .vp__art-bar { animation: none; height: 36%; }
  .vp__panel { transition: none; }
}

/* Swiping (or tapping) between Albums / Player / Written slides the new screen in from the side. */
@keyframes vp-in-right { from { transform: translateX(32px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes vp-in-left  { from { transform: translateX(-32px); opacity: 0; } to { transform: none; opacity: 1; } }
.vp-in-right { animation: vp-in-right .24s ease-out; }
.vp-in-left  { animation: vp-in-left .24s ease-out; }
@media (prefers-reduced-motion: reduce) { .vp-in-right, .vp-in-left { animation: none; } }
