/* Punter-facing request page. Colours come from the artist's theme, applied
   as CSS variables by js/themes.js — nothing here hard-codes a colour. */

.app {
  max-width: 520px;
  margin: auto;
  padding: 28px 20px 40px;
}

header { text-align: center; }

/* Optional header image. The overlay is not optional: it is what keeps the
   logo and heading legible over an arbitrary photo. */
.header-image {
  position: relative;
  height: 150px;
  margin: -28px -20px 18px;
  background-size: cover;
  background-position: center;
}
.header-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--bg) 55%, transparent),
    var(--bg));
}

.logo {
  width: min(280px, 80%);
  max-height: 105px;
  object-fit: contain;
}
.logo.crop-circle {
  width: 108px;
  height: 108px;
  max-height: none;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}
.logo.crop-square {
  border-radius: 12px;
}

/* Opt-in backing plate for artwork that would otherwise vanish into the
   theme. Offered on the profile page when the logo's measured luminance
   clashes with the chosen background. */
.logo.has-plate {
  background: #FFFFFF;
  padding: 12px 16px;
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .28);
}
.logo.crop-circle.has-plate { padding: 8px; }

.eyebrow { margin-top: 15px; }

/* Loading skeleton — placeholders while branding is fetched. */
.skeleton .shimmer {
  background: var(--card);
  border-radius: 12px;
  margin: 12px auto;
  animation: shimmer 1.2s ease-in-out infinite alternate;
}
@keyframes shimmer {
  from { opacity: .5; }
  to { opacity: 1; }
}

.card {
  margin-top: 24px;
  /* Torn lower edge — the request slip. */
  -webkit-mask:
    linear-gradient(#000 0 0) top/100% calc(100% - 12px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120v3l-8 6-9-5-8 7-11-6-9 5-10-7-9 8-11-5-8 5-10-6-9 7-9-6-9 4z'/%3E%3C/svg%3E") bottom/120px 12px repeat-x;
  mask:
    linear-gradient(#000 0 0) top/100% calc(100% - 12px) no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12' preserveAspectRatio='none'%3E%3Cpath d='M0 0h120v3l-8 6-9-5-8 7-11-6-9 5-10-7-9 8-11-5-8 5-10-6-9 7-9-6-9 4z'/%3E%3C/svg%3E") bottom/120px 12px repeat-x;
  padding-bottom: 30px;
}

.search-wrap { position: relative; }

.search-wrap input { margin-top: 10px; }

/* Deliberately IN FLOW, not an overlay. As an absolutely-positioned dropdown
   this covered the Send button, so tapping Send hit a suggestion and silently
   replaced the punter's song. Pushing the form down instead means nothing is
   ever trapped underneath it. */
.suggestions {
  display: none;
  margin-top: 8px;
  max-height: 260px;
  overflow-y: auto;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.suggestion {
  padding: 13px 15px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.suggestion:last-child { border-bottom: 0; }
.suggestion:hover { background: var(--border); }

.suggestion-song {
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.suggestion-artist { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* Marks a song the artist has in their own list. Its ABSENCE means nothing:
   every suggestion is otherwise styled identically and equally requestable. */
.tick {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  fill: var(--green);
}

.duplicate-hint {
  width: 100%;
  margin-top: 10px;
  padding: 12px 14px;
  font-size: 14px;
  text-align: left;
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
  border: 1px solid var(--accent);
  color: var(--text);
}

#requestedFor { margin-top: 10px; }

#send {
  width: 100%;
  height: 56px;
  margin-top: 12px;
}

.note { text-align: center; font-size: 12px; line-height: 1.5; }

.top-list { margin-top: 22px; }

.top-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.top-row:last-child { border-bottom: 0; }

.rank { color: var(--accent-text); font-weight: 800; }

.top-song {
  flex: 1;
  min-width: 0;
  overflow-wrap: break-word;
}

.vote {
  flex-shrink: 0;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}
.vote.voted {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  cursor: default;
}

.success { text-align: center; display: none; }

.tip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 58px;
  margin-top: 18px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 16px;
  background: linear-gradient(135deg, #fff, #e9e9ee);
  color: #111;
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tip:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0, 0, 0, .35); }
.tip:active { transform: translateY(0); }

/* Tip amount sheet (amount-capable providers only). */
.tip-sheet {
  display: none;
  margin-top: 18px;
  padding: 16px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  text-align: left;
}
.tip-sheet.show { display: block; }
.tip-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.tip-amount {
  height: 48px;
  background: var(--card-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 15px;
  color: var(--text);
}
.tip-amount.selected {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.tip-custom { margin-top: 10px; height: 48px; }
.tip-go { width: 100%; height: 48px; margin-top: 10px; }

/* Artist links — same block under the form and on the thank-you screen. */
.links-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 18px;
}
.link-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 13px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-size: 12px;
  font-weight: 700;
}
.link-chip svg { width: 15px; height: 15px; fill: var(--accent-text); }
.link-chip:hover { border-color: var(--accent); }

.again {
  width: 100%;
  height: 56px;
  margin-top: 12px;
  color: var(--text);
}

.punter-footer {
  margin-top: 26px;
  text-align: center;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.punter-footer a { color: var(--muted); }

.not-found { text-align: center; padding: 80px 20px; }
