/**
 * @file
 * Registration wizard styles for the 3-step flow.
 */

/* Match page background to form surface color */
body:has(.reg-wizard) {
  background-color: var(--color-background, #FFF9F2);
}

.reg-wizard {
  max-width: 900px;
  margin: 60px auto;
  background: var(--color-surface, #fff);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(28, 20, 17, 0.12);
  border: 3px solid var(--color-accent, #C8A15A);
}

/* ── Header ── */
.reg-wizard__header {
  background: linear-gradient(135deg, #1C1411 0%, #2D211B 100%);
  padding: 40px 48px 32px;
  position: relative;
  color: #fff;
}

/* Override base heading color inside header */
.reg-wizard__header h1,
.reg-wizard__header h2,
.reg-wizard__header h3,
.reg-wizard__header p {
  color: inherit;
}

.reg-wizard__eyebrow {
  display: block;
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-accent, #C8A15A);
  margin-bottom: 12px;
  font-weight: 600;
}

.reg-wizard__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.5px;
  font-style: italic;
  margin: 0;
}

.reg-wizard__subtitle {
  margin: 12px 0 0;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.7) !important;
  line-height: 1.5;
}

.reg-wizard__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: transparent;
  color: #fff;
  font-size: 24px;
  display: grid;
  place-items: center;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
  line-height: 1;
}

.reg-wizard__close:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ── Steps indicator ── */
.reg-wizard__body {
  padding: 40px 48px 48px;
}

.reg-wizard__steps {
  display: flex;
  gap: 48px;
  margin-bottom: 40px;
}

.reg-wizard__step {
  display: flex;
  align-items: center;
  gap: 12px;
}

.reg-wizard__step-num,
.reg-wizard__step-check {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.reg-wizard__step-num {
  border: 2px solid #DCCBB9;
  color: #DCCBB9;
  background: transparent;
}

.reg-wizard__step--active .reg-wizard__step-num {
  background: var(--color-accent, #C8A15A);
  border-color: var(--color-accent, #C8A15A);
  color: #fff;
}

.reg-wizard__step-check {
  background: var(--color-accent, #C8A15A);
  color: #fff;
  border: 2px solid var(--color-accent, #C8A15A);
}

.reg-wizard__step-label {
  font-size: 16px;
  font-weight: 600;
  color: #DCCBB9;
}

.reg-wizard__step--active .reg-wizard__step-label {
  color: var(--color-accent, #C8A15A);
}

.reg-wizard__step--done .reg-wizard__step-label {
  color: var(--color-accent, #C8A15A);
}

/* ── Form ── */
.reg-wizard__form {
  max-width: 100%;
}

.reg-wizard__field {
  margin-bottom: 24px;
}

.reg-wizard__label {
  display: block;
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 8px;
  color: #1C1411;
}

.reg-wizard__input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #EDE3D7;
  border-radius: 16px;
  font-size: 16px;
  background: #fff;
  color: #1C1411;
  transition: border-color 0.2s;
  outline: none;
  font-family: inherit;
}

.reg-wizard__input:focus {
  border-color: var(--color-accent, #C8A15A);
}

.reg-wizard__input--error {
  border-color: #E74C3C;
}

.reg-wizard__input::placeholder {
  color: #BFAE9E;
}

.reg-wizard__error {
  color: #E74C3C;
  font-size: 13px;
  margin-top: 6px;
}

.reg-wizard__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.reg-wizard__note {
  font-size: 14px;
  color: #8C7B6B;
  line-height: 1.5;
  margin-bottom: 32px;
}

.reg-wizard__submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  background: var(--color-primary, #9E461F);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.1s;
}

.reg-wizard__submit:hover {
  background: #7D3816;
  color: #fff;
}

.reg-wizard__submit:active {
  transform: scale(0.98);
}

/* ── Payment (Step 2) ── */
.reg-wizard__payment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.reg-wizard__qr-wrap {
  background: linear-gradient(135deg, #FFF9F2, #F5EDE3);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid #EDE3D7;
}

.reg-wizard__qr-img {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 12px;
}

.reg-wizard__payment-title {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 12px;
  color: #1C1411;
}

.reg-wizard__payment-desc {
  font-size: 15px;
  line-height: 1.6;
  color: #6B5D52;
  margin-bottom: 24px;
}

.reg-wizard__payment-detail {
  border-top: 1px solid #EDE3D7;
}

.reg-wizard__payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid #EDE3D7;
}

.reg-wizard__payment-label {
  font-weight: 700;
  font-size: 15px;
  color: #1C1411;
}

.reg-wizard__payment-value {
  font-size: 15px;
  color: #1C1411;
  display: flex;
  align-items: center;
  gap: 8px;
}

.reg-wizard__payment-value--amount {
  font-size: 20px;
  font-weight: 800;
  color: var(--color-accent, #C8A15A);
}

.reg-wizard__payment-code {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--color-accent, #C8A15A);
  background: none;
  padding: 0;
}

.reg-wizard__copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #8C7B6B;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}

.reg-wizard__copy-btn:hover {
  color: var(--color-primary, #9E461F);
}

/* ── Polling indicator ── */
.reg-wizard__polling {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #FFF5EB;
  border-radius: 12px;
  margin-top: 24px;
  font-size: 14px;
  color: #6B5D52;
}

.reg-wizard__polling-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid #EDE3D7;
  border-top-color: var(--color-accent, #C8A15A);
  border-radius: 50%;
  animation: reg-spin 0.8s linear infinite;
}

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

.reg-wizard__demo-link {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: #BFAE9E;
  text-decoration: underline;
}

.reg-wizard__demo-link:hover {
  color: #8C7B6B;
}

/* ── Success (Step 3) ── */
.reg-wizard__success {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.reg-wizard__success-visual {
  background: linear-gradient(135deg, #FFF9F2, #F5EDE3);
  border-radius: 20px;
  padding: 48px 32px;
  text-align: center;
  border: 3px solid #EDE3D7;
}

.reg-wizard__success-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--color-primary, #9E461F);
  display: grid;
  place-items: center;
  margin: 0 auto 24px;
}

.reg-wizard__success-circle svg circle {
  stroke: none;
}

.reg-wizard__success-circle svg path {
  stroke: #fff;
}

.reg-wizard__success-amount {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-accent, #C8A15A);
  letter-spacing: 1px;
  margin: 16px 0 4px;
}

.reg-wizard__success-code {
  font-size: 14px;
  color: #6B5D52;
}

.reg-wizard__success-title {
  font-size: 32px;
  font-weight: 900;
  letter-spacing: -0.5px;
  margin: 0 0 16px;
  color: #1C1411;
}

.reg-wizard__success-desc {
  font-size: 16px;
  line-height: 1.6;
  color: #6B5D52;
  margin-bottom: 32px;
}

.reg-wizard__success-note {
  margin-top: 24px;
  font-size: 14px;
  color: #8C7B6B;
  line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .reg-wizard {
    border-radius: 20px;
    margin: 24px 16px;
  }

  .reg-wizard__header {
    padding: 28px 24px 24px;
  }

  .reg-wizard__body {
    padding: 28px 24px 32px;
  }

  .reg-wizard__steps {
    gap: 16px;
    flex-wrap: wrap;
  }

  .reg-wizard__step-num,
  .reg-wizard__step-check {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .reg-wizard__step-label {
    font-size: 14px;
  }

  .reg-wizard__row {
    grid-template-columns: 1fr;
  }

  .reg-wizard__payment,
  .reg-wizard__success {
    grid-template-columns: 1fr;
  }

  .reg-wizard__submit {
    width: 100%;
  }
}
