/* Legitimerings-popups for spiller-klienten (/web/).
 *
 * To varianter, samme skall (design-handoff 2026-07-14):
 *   .legit-welcome  — «Velkommen til Spillorama» (ny selvregistrert, PENDING).
 *   .legit-error    — «Fullfør registreringen i hallen» (auto-godkjent, myk
 *                     påminnelse; spilleren er IKKE sperret).
 *
 * Klassene er `legit-`-prefiksede så de ikke kolliderer med lobby/min-konto-CSS.
 * Eksternt fil (ikke inline) pga. CSP-håndheving i /web-skallet.
 */
.legit-root {
  --legit-gold: #ffd76a;
  --legit-gold-bright: #ffe7a3;
  --legit-gold-deep: #e6a817;
  --legit-gold-line: rgba(255, 200, 90, 0.4);
  --legit-amber: #ffb454;
  --legit-card-line: rgba(255, 200, 90, 0.18);
  --legit-ink: #fff;
  --legit-dim: rgba(255, 240, 225, 0.72);
  --legit-dim2: rgba(255, 240, 225, 0.5);
  --legit-font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;

  position: fixed;
  inset: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  font-family: var(--legit-font);
  overflow-y: auto;
}
.legit-root[hidden] { display: none; }

.legit-backdrop {
  position: fixed;
  inset: 0;
  /* Solid semi-transparent (alpha >= 0.85) i stedet for backdrop-filter blur:
   * prosjekt-lint forbyr backdrop-filter på HTML-overlays over Pixi-canvas
   * (tvinger GPU til å re-kjøre blur-shader per frame → flimmer). */
  background: rgba(9, 3, 5, 0.88);
}

.legit-modal {
  position: relative;
  z-index: 1;
  width: 560px;
  max-width: 100%;
  background: linear-gradient(180deg, #341019, #230a0f);
  border: 1px solid var(--legit-card-line);
  border-radius: 24px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.66), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 56px 52px 46px;
  text-align: center;
  overflow: hidden;
  animation: legit-pop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.06) both;
}
.legit-modal::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, transparent, var(--legit-gold), transparent);
  opacity: 0.85;
}
.legit-error .legit-modal::before {
  background: linear-gradient(90deg, transparent, var(--legit-amber), transparent);
}
@keyframes legit-pop {
  0% { opacity: 0; transform: translateY(26px) scale(0.96); }
  100% { opacity: 1; transform: none; }
}

.legit-seal {
  width: 96px;
  height: 96px;
  margin: 0 auto 30px;
  border-radius: 50%;
  position: relative;
  background: radial-gradient(120% 120% at 30% 20%, var(--legit-gold-bright), var(--legit-gold) 45%, var(--legit-gold-deep));
  box-shadow: 0 12px 34px rgba(230, 168, 23, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: legit-seal 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2) 0.12s both;
}
.legit-error .legit-seal {
  background: radial-gradient(120% 120% at 30% 20%, #ffd79a, var(--legit-amber) 48%, #d98520);
  box-shadow: 0 12px 34px rgba(217, 133, 32, 0.45), inset 0 2px 4px rgba(255, 255, 255, 0.5);
}
.legit-seal::after {
  content: "";
  position: absolute;
  inset: -9px;
  border-radius: 50%;
  border: 1.5px solid var(--legit-gold-line);
}
.legit-error .legit-seal::after { border-color: rgba(255, 180, 84, 0.4); }
.legit-seal svg { width: 50px; height: 50px; }
@keyframes legit-seal {
  0% { opacity: 0; transform: scale(0.4) rotate(-18deg); }
  100% { opacity: 1; transform: none; }
}

.legit-eyebrow {
  color: var(--legit-gold);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.legit-error .legit-eyebrow { color: var(--legit-amber); }
.legit-title {
  color: var(--legit-ink);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.legit-lede {
  color: var(--legit-dim);
  font-size: 16.5px;
  line-height: 1.6;
  margin-top: 16px;
}

.legit-hall {
  margin-top: 22px;
  text-align: left;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--legit-card-line);
  border-radius: 16px;
  padding: 20px 22px;
}
.legit-hall-row { display: flex; align-items: flex-start; gap: 14px; }
.legit-hall-row + .legit-hall-row {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.legit-hall-ico {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 200, 90, 0.12);
  color: var(--legit-gold);
}
.legit-hall-ico svg { width: 19px; height: 19px; }
.legit-hall-txt { display: flex; flex-direction: column; }
.legit-hall-txt .legit-k {
  color: var(--legit-dim2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.legit-hall-txt .legit-v {
  color: var(--legit-ink);
  font-size: 19px;
  font-weight: 700;
  margin-top: 3px;
}

.legit-pick { margin-top: 24px; text-align: left; }
.legit-pick-lbl {
  color: var(--legit-gold-bright);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 9px;
}
.legit-select-wrap { position: relative; }
.legit-select-wrap svg {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--legit-gold);
  pointer-events: none;
}
.legit-select {
  width: 100%;
  appearance: none;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: var(--legit-ink);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--legit-card-line);
  border-radius: 13px;
  padding: 16px 44px 16px 18px;
  cursor: pointer;
}
.legit-select:focus {
  outline: none;
  border-color: var(--legit-gold);
  box-shadow: 0 0 0 3px rgba(255, 200, 90, 0.16);
}
.legit-select option { background: #2a0e14; color: #fff; }

.legit-actions { margin-top: 30px; display: flex; flex-direction: column; gap: 12px; }
.legit-btn {
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  border-radius: 13px;
  padding: 17px 22px;
  font-size: 16px;
  letter-spacing: 0.3px;
  transition: transform 0.12s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.legit-btn-primary {
  color: #2a0e14;
  background: linear-gradient(180deg, var(--legit-gold-bright), var(--legit-gold) 55%, var(--legit-gold-deep));
  box-shadow: 0 10px 26px rgba(230, 168, 23, 0.4);
}
.legit-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(230, 168, 23, 0.52); }
.legit-btn-primary:disabled { opacity: 0.45; cursor: not-allowed; transform: none; box-shadow: none; }
.legit-btn-ghost { color: var(--legit-dim); background: transparent; border: 1px solid var(--legit-card-line); }
.legit-btn-ghost:hover { color: var(--legit-ink); background: rgba(255, 255, 255, 0.04); }

.legit-support { margin-top: 22px; color: var(--legit-dim2); font-size: 14px; line-height: 1.5; }
.legit-support a { color: var(--legit-gold); font-weight: 700; text-decoration: none; }
.legit-support a:hover { color: var(--legit-gold-bright); text-decoration: underline; }

.legit-hide { display: none !important; }

@media (max-width: 560px) {
  .legit-modal { padding: 44px 24px 32px; border-radius: 20px; }
  .legit-title { font-size: 26px; }
}
