/* ============================================================
   modals.css — Artist card modal
   ============================================================ */

/* ── Backdrop ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(43, 78, 204, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
  padding: 20px;
}

.modal-backdrop.is-open {
  opacity: 1;
  pointer-events: all;
}

/* ── Card ─────────────────────────────────────────────────── */
.modal-card {
  background: var(--color-cream);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 44px 36px;
  position: relative;
  transform: scale(0.92);
  transition: transform 200ms cubic-bezier(0.2, 0, 0, 1);
  /* Paper grain on the card */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E"),
                  linear-gradient(var(--color-cream), var(--color-cream));
}

.modal-backdrop.is-open .modal-card { transform: scale(1); }

/* ── Close ────────────────────────────────────────────────── */
.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.65;
  transition: opacity 140ms ease;
}

.modal-close:hover { opacity: 1; }

.modal-close svg { overflow: visible; }

.close-line {
  stroke: var(--color-blue);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* ── Content ──────────────────────────────────────────────── */
.modal-artist-name {
  font-family: var(--font-display);
  font-size: 34px;
  color: var(--color-blue);
  line-height: 1.1;
  margin-bottom: 18px;
}

.modal-bio {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  color: var(--color-ink);
  margin-bottom: 14px;
  white-space: pre-wrap; /* preserves \n line breaks in bio text */
}

.modal-attribution {
  font-family: var(--font-body);
  font-style: italic;
  font-size: 14px;
  color: var(--color-blue);
  opacity: 0.65;
  margin-bottom: 22px;
}

.bio-link {
  color: var(--color-blue);
  text-underline-offset: 3px;
}

.bio-link:hover { opacity: 0.7; }

.modal-mix-link {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--color-blue);
  cursor: pointer;
  display: inline-block;
  transition: color var(--t-hover);
}

.modal-mix-link:hover { color: var(--color-blue-hover); }

/* ── Password modal (welcome page) ───────────────────────── */
.pw-overlay {
  position: fixed;
  inset: 0;
  z-index: 7000;
  background: var(--color-page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.pw-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.pw-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.pw-prompt {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 30px;
  color: var(--color-blue);
  margin: 0;
}

.pw-input {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 24px;
  color: var(--color-ink);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--color-blue);
  outline: none;
  text-align: center;
  width: 260px;
  padding: 4px 0 6px;
  caret-color: var(--color-blue);
}

.pw-submit {
  font-family: 'Special Elite', 'Courier New', monospace;
  font-size: 18px;
  color: var(--color-blue);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.05em;
}

.pw-submit:hover { opacity: 0.7; }

.pw-error {
  font-family: 'Courier Prime', 'Courier New', monospace;
  font-size: 17px;
  color: var(--color-red);
  min-height: 1.5em;
  margin: 0;
}

/* ── Mobile: full-screen modal ────────────────────────────── */
@media (max-width: 768px) {
  .modal-backdrop { padding: 0; align-items: flex-end; }

  .modal-card {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0;
    padding: 32px 24px 40px;
  }
}
