/**
 * Premium multi-stage model registration UI.
 */

.sl-mrf-shell {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px 60px;
}

.sl-mrf-card {
  width: min(920px, 100%);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.92), rgba(8, 10, 15, 0.98));
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  padding: clamp(24px, 4vw, 40px);
}

.sl-mrf-card--narrow {
  max-width: 520px;
}

.sl-mrf-head h1 {
  margin: 10px 0 8px;
  font-family: "Sora", sans-serif;
  font-size: clamp(26px, 4vw, 34px);
  color: #f8fafc;
}

.sl-mrf-head p {
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

.sl-mrf-head--center {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
}

.sl-mrf-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sl-mrf-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.sl-mrf-field span {
  display: block;
  margin-bottom: 6px;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 600;
}

.sl-mrf-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #f8fafc;
}

.sl-mrf-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

.sl-mrf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  border: 0;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s, filter 0.2s;
}

.sl-mrf-btn--primary {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
}

.sl-mrf-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #e2e8f0;
}

.sl-mrf-btn--wide {
  width: 100%;
}

.sl-mrf-btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.sl-mrf-alert {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #bae6fd;
  margin-bottom: 16px;
}

.sl-mrf-alert--error {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.sl-mrf-muted {
  color: #64748b;
  font-size: 13px;
}

.sl-mrf-footnote {
  margin-top: 18px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
}

.sl-mrf-footnote a {
  color: #f87171;
}

.sl-mrf-success-state {
  text-align: center;
}

.sl-mrf-success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 32px;
}

.sl-mrf-success-icon--error {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
}

/* Verify modal */
.sl-mrf-modal-backdrop {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
  z-index: 1000;
}

.sl-mrf-modal-backdrop--inline {
  position: relative;
  inset: auto;
  background: transparent;
  backdrop-filter: none;
  padding: 0 0 20px;
  z-index: 1;
}

.sl-mrf-modal--compact {
  width: min(560px, 100%);
  margin: 0 auto;
}

.sl-mrf-modal {
  position: relative;
  width: min(520px, 100%);
  padding: 36px 28px 28px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, #111827, #080a0f);
  text-align: center;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.55);
}

.sl-mrf-modal__glow {
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.35), transparent 40%, rgba(56, 189, 248, 0.2));
  z-index: -1;
  opacity: 0.6;
}

.sl-mrf-modal__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  font-size: 28px;
}

.sl-mrf-modal h1 {
  color: #f8fafc;
  font-family: "Sora", sans-serif;
  margin: 0 0 10px;
}

.sl-mrf-modal__lead {
  color: #e2e8f0;
  font-size: 16px;
}

.sl-mrf-modal p {
  color: #94a3b8;
  line-height: 1.6;
}

.sl-mrf-modal__list {
  list-style: none;
  margin: 20px 0;
  padding: 0;
  text-align: left;
  display: grid;
  gap: 10px;
}

.sl-mrf-modal__list li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #cbd5e1;
  font-size: 14px;
}

.sl-mrf-modal__list i {
  color: #4ade80;
}

.sl-mrf-modal__fine {
  margin-top: 14px;
}

/* Category picker */
.sl-mrf-cat-picker {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.25);
}

.sl-mrf-cat-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.5);
}

.sl-mrf-cat-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: #94a3b8;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.sl-mrf-cat-tab.is-active {
  background: rgba(239, 68, 68, 0.18);
  border-color: #ef4444;
  color: #fff;
}

.sl-mrf-cat-panel {
  display: none;
  padding: 14px;
  max-height: 280px;
  overflow: auto;
}

.sl-mrf-cat-panel.is-active {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.sl-mrf-cat-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(15, 23, 42, 0.6);
  cursor: pointer;
  color: #e2e8f0;
  font-size: 13px;
  transition: border-color 0.2s, background 0.2s;
}

.sl-mrf-cat-chip:has(input:checked) {
  border-color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.sl-mrf-cat-chip input {
  accent-color: #ef4444;
}

.sl-mrf-cat-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  min-height: 32px;
}

.sl-mrf-cat-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
  font-size: 12px;
}

/* Geo cascade */
.sl-mrf-geo-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 640px) {
  .sl-mrf-geo-row {
    grid-template-columns: 1fr;
  }
}

.sl-mrf-identity-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.sl-mrf-identity-panel {
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.25);
}

.sl-mrf-identity-panel--accent {
  border-color: rgba(239, 68, 68, 0.35);
}

.sl-mrf-identity-panel h2 {
  font-size: 16px;
  color: #f8fafc;
  margin: 0 0 8px;
}

.sl-mrf-identity-panel p {
  margin: 0;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1.55;
}

.sl-mrf-idv-mount {
  min-height: 120px;
  padding: 20px;
  border-radius: 16px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .sl-mrf-identity-grid {
    grid-template-columns: 1fr;
  }
}

/* Complete profile overrides */
body.sl-mrf-complete .sl-reg-wizard-progress__label span:first-child::after {
  content: " · Profile completion";
}

.sl-mrf-complete #reg-step-account,
.sl-mrf-complete .sl-reg-wizard-nav [data-reg-wizard-back] {
  display: none !important;
}

html.sl-mrf-complete .sl-reg-wizard-panel[data-reg-wizard-step="1"] {
  display: none !important;
}

/* Profile submit success overlay */
.sl-mrf-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.sl-mrf-success-overlay.is-visible {
  opacity: 1;
}

.sl-mrf-success-overlay.is-leaving {
  opacity: 0;
}

.sl-mrf-success-overlay__card {
  position: relative;
  width: min(460px, 100%);
  padding: 36px 28px 24px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(160deg, #111827, #080a0f);
  text-align: center;
  transform: scale(0.88) translateY(24px);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
}

.sl-mrf-success-overlay__card.is-shown {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.sl-mrf-success-overlay__ring {
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: conic-gradient(from 180deg, rgba(34, 197, 94, 0.5), transparent, rgba(239, 68, 68, 0.35));
  z-index: -1;
  opacity: 0.55;
  animation: sl-mrf-ring-spin 3s linear infinite;
}

@keyframes sl-mrf-ring-spin {
  to { transform: rotate(360deg); }
}

.sl-mrf-success-overlay__card h2 {
  margin: 12px 0 8px;
  color: #f8fafc;
  font-family: "Sora", sans-serif;
}

.sl-mrf-success-overlay__card p {
  color: #94a3b8;
  line-height: 1.6;
  margin: 0;
}

.sl-mrf-success-overlay__bar {
  margin-top: 22px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.sl-mrf-success-overlay__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #22c55e, #4ade80);
  animation-name: sl-mrf-success-progress;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes sl-mrf-success-progress {
  from { width: 0; }
  to { width: 100%; }
}
