/* ==========================================================
   Store / Tickets / Music popups
   Opened from the quick dock (assets/js/popupmodals.js).
   Uses the site tokens from style.css (--panel-solid, --line,
   --accent, --accent-2, --neon, --muted, --gold).
   ========================================================== */

/* ---------- Overlay ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1000; /* above the header (10) and the quick dock */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(3, 4, 8, 0.72);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal.show {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Panel ---------- */
.modal-panel {
  position: relative;
  width: min(460px, 100%);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  scrollbar-width: none;
  padding: 2.25rem 1.75rem 1.75rem;
  border: 1px solid rgba(0, 232, 255, 0.28);
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 0%, rgba(0, 232, 255, 0.12), transparent 60%),
    var(--panel-solid);
  box-shadow: var(--shadow), 0 0 40px rgba(0, 232, 255, 0.12);
  color: var(--text);
  text-align: center;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal-panel::-webkit-scrollbar {
  display: none;
}

.modal.show .modal-panel {
  transform: none;
}

.modal-panel h2 {
  margin-bottom: 0.5rem;
  font-size: clamp(1.8rem, 6vw, 2.4rem);
}

.modal-lead {
  margin: 0 auto 1.5rem;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.95rem;
}

.modal-note {
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

/* Full-width call to action */
.modal-panel .button {
  width: 100%;
  cursor: pointer;
}

/* ---------- Close (x) ---------- */
.modal-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.modal-close:hover {
  background: var(--neon);
  color: #05060a;
  transform: rotate(90deg);
}

.modal-close:focus-visible,
.player .buttons > div:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ==========================================================
   Store: partner plan
   ========================================================== */
.plan-price {
  margin: 0.25rem 0 0.25rem;
  color: var(--accent);
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.1;
  text-shadow: 0 0 24px rgba(88, 240, 255, 0.3);
}

.plan-price span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
}

/* Highlight row: revenue share + what we handle */
.plan-perks {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}

.plan-perks li {
  padding: 0.3rem 0.85rem;
  border: 1px solid rgba(0, 232, 255, 0.4);
  border-radius: 999px;
  background: rgba(0, 232, 255, 0.07);
  color: #d7fbff;
  font-size: 0.78rem;
  font-weight: 700;
}

.plan-perks li.is-gold {
  border-color: rgba(255, 207, 90, 0.55);
  background: rgba(255, 207, 90, 0.1);
  color: var(--gold);
}

.plan-features {
  margin: 0 0 1.75rem;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
  text-align: left;
}

.plan-features li {
  position: relative;
  padding: 0.4rem 0 0.4rem 1.9rem;
  font-size: 0.95rem;
}

.plan-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.45rem;
  display: grid;
  place-items: center;
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05060a;
  font-size: 0.72rem;
  font-weight: 800;
}

/* ==========================================================
   Tickets: upcoming shows
   ========================================================== */
.modal-panel.is-wide {
  width: min(560px, 100%);
}

.show-list {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.show-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.show-item:hover {
  border-color: rgba(0, 232, 255, 0.45);
  background: rgba(0, 232, 255, 0.06);
  transform: translateY(-2px);
}

/* Calendar-style date block */
.show-date {
  display: grid;
  place-items: center;
  width: 3.6rem;
  padding: 0.4rem 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05060a;
  line-height: 1.05;
}

.show-date .month {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.show-date .day {
  font-size: 1.45rem;
  font-weight: 800;
}

.show-date .year {
  font-size: 0.62rem;
  font-weight: 700;
  opacity: 0.75;
}

.show-info h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.show-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.show-item .button {
  width: auto;
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ==========================================================
   Music: player (hooks used by assets/js/ipodstyle.js)
   ========================================================== */
/* Full screen height: the background area will later hold a video / looping GIF */
.modal-panel.is-player {
  height: calc(100vh - 2rem);
  height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
}

.player,
.player .wrapper {
  height: 100%;
}

.player .wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ipodstyle.js paints the current song's cover onto .wrapper as the
   background; this layer only darkens the bottom so the controls stay readable */
.player .wrapper {
  position: relative;
  isolation: isolate;
  padding: 2.5rem 1.5rem 1.5rem;
  background-color: var(--panel-solid);
}

.player .wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, 0.75));
}

/* Background video (songs with a "video" in ipodstyle.js) */
.player .player-bg-video {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.player .player-bg-video:not([src]) {
  display: none;
}

/* With a video / GIF behind the player, hide the spinning cover circle */
.player .wrapper.has-video .track-art {
  display: none;
}

/* ...and keep the song info + controls at the bottom so the video shows */
.player .wrapper.has-video {
  justify-content: flex-end;
}

.player .wrapper.has-video .details {
  margin-top: auto;
}

.player .track-name,
.player .track-artist,
.player .slider_container,
.player .now-playing {
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.player .details {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.player .now-playing {
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.player .track-art {
  width: 220px;
  height: 220px;
  margin: 1.25rem 0;
  border: 3px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background-color: #000;
  background-position: center;
  background-size: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 0 8px rgba(0, 232, 255, 0.12);
}

.player .track-art.rotate {
  animation: player-spin 8s linear infinite;
}

@keyframes player-spin {
  to {
    transform: rotate(360deg);
  }
}

.player .track-name {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 0 18px rgba(0, 232, 255, 0.35);
}

.player .track-artist {
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Seek bar */
.player .slider_container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.player .seek_slider {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.player .seek_slider::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(88, 240, 255, 0.7);
  -webkit-appearance: none;
}

.player .seek_slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(88, 240, 255, 0.7);
}

/* Controls */
.player .buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1rem;
  color: var(--text);
}

.player .buttons > div {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 180ms ease, color 180ms ease, transform 180ms ease;
}

.player .buttons > div:hover {
  opacity: 1;
  color: var(--accent);
}

.player .buttons i {
  font-size: 1.15rem; /* overrides the fa-2x set in the markup */
}

/* Big round play / pause (ipodstyle.js swaps the icon inside) */
.player .buttons .playpause-track {
  width: 4.25rem;
  height: 4.25rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #05060a;
  opacity: 1;
  box-shadow: 0 0 24px rgba(0, 232, 255, 0.35);
}

.player .buttons .playpause-track:hover {
  color: #05060a;
  transform: scale(1.06);
}

.player .buttons .playpause-track i {
  font-size: 2.1rem;
}

/* Font Awesome play/pause-circle draw their own ring; show the plain glyph look */
.player .buttons .playpause-track .fa-play-circle::before {
  content: "\f04b"; /* play */
  margin-left: 0.2rem;
  font-size: 1.5rem;
}

.player .buttons .playpause-track .fa-pause-circle::before {
  content: "\f04c"; /* pause */
  font-size: 1.5rem;
}

/* Shuffle is on */
.player .randomActive {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(88, 240, 255, 0.8);
}

/* ==========================================================
   Projects: featured edit + gallery (tiles styled in style.css)
   ========================================================== */
/* Removed from layout while closed, so its videos (data-autoplay)
   don't download or play until the popup is opened. */
.modal.is-gallery-modal:not(.show) {
  display: none;
}

.modal.is-gallery-modal.show {
  animation: galleryFade 0.3s ease;
}

.modal.is-gallery-modal.show .modal-panel {
  animation: galleryRise 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes galleryFade {
  from { opacity: 0; }
}

@keyframes galleryRise {
  from { transform: translateY(24px) scale(0.98); }
}

.modal-panel.is-gallery {
  width: min(1200px, 100%);
  height: calc(100dvh - 2rem);
  max-height: none;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  overscroll-behavior: contain;
  text-align: left;
}

.modal-panel.is-gallery .section-heading {
  margin-bottom: 1.5rem;
  padding-right: 3rem; /* clear the close button */
}

.modal-panel.is-gallery .section-heading .eyebrow {
  margin: 0 0 0.25rem;
}

.modal-panel.is-gallery .section-heading h2 {
  margin: 0 0 0.25rem;
}

.modal-panel.is-gallery .filters {
  margin: 1.75rem 0 1rem;
}

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  .modal.is-gallery-modal {
    padding: 0.5rem;
  }

  .modal-panel.is-gallery {
    height: calc(100dvh - 1rem);
    max-height: none;
    padding: 1.25rem 0.9rem;
  }

  .modal-panel {
    max-height: calc(100dvh - 2rem);
    padding: 2rem 1.25rem 1.25rem;
  }

  /* Touch-sized close button */
  .modal-close {
    width: 2.75rem;
    height: 2.75rem;
  }

  .player .track-art {
    width: 180px;
    height: 180px;
  }

  .player .buttons {
    gap: 0.25rem;
  }

  .show-item {
    grid-template-columns: auto 1fr;
  }

  .show-item .button {
    grid-column: 1 / -1;
    width: 100%;
    min-height: 2.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal,
  .modal-panel {
    transition: none;
    animation: none !important;
  }

  .player .track-art.rotate {
    animation: none;
  }
}
