/* Index page — token wizard */

.hero-summary {
  padding: 24px 0 20px;
  max-width: 560px;
}

.hero-summary h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.hero-summary-text {
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0 0 10px;
}

.hero-summary-meta {
  font-size: 0.8125rem;
  color: var(--primary);
  font-weight: 500;
  margin: 0;
}

.create-token-section {
  padding-bottom: 48px;
  min-width: 0;
  overflow-x: hidden;
}

.create-token-section .form-card {
  margin-bottom: 48px;
}

.form-section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 24px;
}

.wizard-progress {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
  padding: 0 8px;
}

.wizard-progress::before {
  content: "";
  position: absolute;
  top: 15px;
  left: 12%;
  right: 12%;
  height: 1px;
  background: var(--border);
  z-index: 0;
}

.wizard-progress-fill {
  position: absolute;
  top: 15px;
  left: 12%;
  height: 1px;
  background: var(--primary);
  z-index: 1;
  transition: width 0.3s ease;
  width: 0%;
}

.wizard-step-indicator {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  flex: 1;
}

.wizard-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
}

.wizard-step-indicator.active .wizard-dot {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.wizard-step-indicator.done .wizard-dot {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--primary);
}

.wizard-step-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

.wizard-step-indicator.active .wizard-step-label {
  color: var(--text);
  font-weight: 600;
}

@media (max-width: 480px) {
  .wizard-step-label { display: none; }

  .wizard-progress {
    margin-bottom: 10px;
  }

  .wizard-dot {
    width: 24px;
    height: 24px;
    font-size: 0.625rem;
  }

  .wizard-progress::before,
  .wizard-progress-fill {
    top: 11px;
  }
}

.wizard-mobile-step {
  display: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: var(--radius);
  text-align: center;
}

@media (max-width: 768px) {
  .wizard-mobile-step { display: block; }

  .hero-summary {
    padding: 12px 0 10px;
  }

  .hero-summary h1 {
    font-size: 1.25rem;
    margin-bottom: 6px;
  }

  .hero-summary-text {
    font-size: 0.8125rem;
    line-height: 1.45;
    margin-bottom: 8px;
  }

  .hero-summary-meta {
    font-size: 0.6875rem;
    line-height: 1.4;
  }

  .create-token-section .form-card {
    margin-bottom: 20px;
  }

  .wizard-progress {
    margin-bottom: 14px;
    padding: 0 2px;
  }

  .wizard-dot {
    width: 26px;
    height: 26px;
    font-size: 0.6875rem;
  }

  .wizard-progress::before,
  .wizard-progress-fill {
    top: 12px;
  }

  .wizard-mobile-step {
    font-size: 0.8125rem;
    margin-bottom: 14px;
    padding: 8px 12px;
  }

  .step-heading {
    font-size: 1rem;
    margin-bottom: 2px;
  }

  .step-subheading {
    font-size: 0.8125rem;
    margin-bottom: 16px;
    line-height: 1.45;
  }

  .wizard-nav {
    margin-top: 18px;
    padding-top: 16px;
    gap: 8px;
  }

  .wizard-nav .btn-back,
  .wizard-nav .btn-next {
    width: 100%;
    min-height: var(--btn-h-lg);
    font-size: 0.875rem;
    padding: 9px 14px;
  }

  .wizard-nav > div:empty { display: none; }

  .payment-info {
    padding: 14px;
    margin-bottom: 12px;
  }

  .payment-fee-row {
    padding: 10px 12px;
    margin-bottom: 12px;
  }

  .payment-fee-label {
    font-size: 0.75rem;
  }

  .payment-fee-value {
    font-size: 0.875rem;
  }

  .payment-field + .payment-field {
    margin-top: 10px;
  }

  .payment-field-value {
    padding: 8px 10px;
    font-size: 0.6875rem;
  }

  .payment-field-value--memo {
    font-size: 0.75rem;
  }

  .payment-note {
    margin: 12px 0 14px;
    font-size: 0.6875rem;
  }

  #checkPaymentBtn,
  .payment-check-btn {
    width: 100%;
    display: flex !important;
    justify-content: center;
    min-height: var(--btn-h-lg) !important;
    font-size: 0.875rem !important;
    padding: 9px 14px !important;
    border-radius: var(--radius) !important;
  }

  .payment-error {
    font-size: 0.75rem;
  }

  .payment-success-banner {
    padding: 10px 12px;
  }

  .payment-success-msg {
    font-size: 0.8125rem;
  }

  #isCreateTokenBtn,
  .payment-success {
    width: 100%;
  }

  #isCreateTokenBtn button[type="submit"],
  .submit-btn-launch {
    width: 100% !important;
    min-height: var(--btn-h-lg);
    font-size: 0.875rem;
  }

  .benefits-strip {
    margin-bottom: 20px;
    gap: 10px;
  }

  .benefit-item {
    padding: 14px;
  }

  .benefit-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 10px;
  }

  .benefit-icon svg {
    width: 18px;
    height: 18px;
  }

  .benefit-item h3 {
    font-size: 0.875rem;
    margin-bottom: 4px;
  }

  .benefit-item p {
    font-size: 0.8125rem;
  }

  .file-upload-container {
    padding: 14px;
  }

  .file-upload-btn {
    min-height: var(--btn-h);
    padding: 8px 14px;
    width: 100%;
    font-size: 0.8125rem;
  }

  .file-name {
    font-size: 0.75rem;
  }

  #toggleOrgInfo {
    min-height: var(--btn-h);
    padding: 10px 12px !important;
    font-size: 0.8125rem !important;
  }

  #orgInfoFields {
    padding: 12px !important;
  }

  .dns-alert {
    padding: 12px;
    font-size: 0.8125rem;
  }

  .final-cta h2 {
    font-size: 1.125rem;
  }

  /* Neutralize Tailwind spacing/sizing on form elements */
  #tokenForm.space-y-6 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem !important;
  }

  .form-step .space-y-5 > :not([hidden]) ~ :not([hidden]) {
    margin-top: 0.875rem !important;
  }

  .form-input.p-3,
  .form-input.rounded-lg {
    padding: 8px 12px !important;
    border-radius: var(--radius) !important;
    min-height: var(--input-h) !important;
  }

  .submit-btn.rounded-full {
    border-radius: var(--radius) !important;
  }

  #tokenCreatedSectionId {
    padding: 14px !important;
    margin-bottom: 14px !important;
  }

  #tokenCreatedSectionId h3 {
    font-size: 1rem !important;
  }

  #tokenCreatedSectionId p,
  #tokenCreatedSectionId .text-sm {
    font-size: 0.8125rem !important;
  }

  #tokenCreatedSectionId .bg-white {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }

  #previewBtn {
    font-size: 0.8125rem !important;
    padding: 7px 12px !important;
    border-radius: var(--radius) !important;
    margin-right: 0 !important;
    margin-bottom: 8px;
    width: 100%;
  }
}

.form-step { display: none; }
.form-step.active { display: block; }

.step-heading {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}

.step-subheading {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 24px;
}

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

@media (max-width: 768px) {
  .wizard-nav {
    flex-direction: column-reverse;
  }
}

.btn-back {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  color: var(--text);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: var(--btn-h-lg);
}

.btn-back:hover { background: var(--bg); }

.btn-next {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  min-height: var(--btn-h-lg);
}

.btn-next:hover { background: var(--primary-hover); }

.tooltip {
  cursor: help;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.file-upload-container {
  width: 100%;
  background: var(--bg);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.file-upload-btn {
  border: 1px solid var(--border-strong);
  color: var(--text);
  background: var(--surface);
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
}

.file-upload-input {
  position: absolute;
  font-size: 100px;
  right: 0;
  top: 0;
  opacity: 0;
  cursor: pointer;
}

.file-name {
  margin-top: 8px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.benefits-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 48px;
}

@media (max-width: 768px) {
  .benefits-strip { grid-template-columns: 1fr; }
}

.benefit-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.benefit-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-subtle);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--primary);
}

.benefit-item h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.benefit-item p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.popup {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  overflow: auto;
}

.popup img {
  max-width: 100%;
  height: auto;
}

#localStoragePopup > div {
  max-width: calc(100vw - 32px) !important;
  margin: 16px !important;
}

#tokenCreatedSectionId {
  min-width: 0;
  overflow-wrap: anywhere;
}

#tokenCreatedSectionId code {
  display: block;
  min-width: 0;
  word-break: break-all;
  overflow-wrap: anywhere;
}

#tokenCreatedSectionId .flex {
  flex-wrap: wrap;
  min-width: 0;
}

#tokenCreatedSectionId a {
  word-break: break-all;
}

.popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 999;
}

.payment-info {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.payment-fee-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--primary-subtle);
  border: 1px solid #b7d9cd;
  border-radius: var(--radius);
}

.payment-fee-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

.payment-fee-value {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}

.payment-field + .payment-field {
  margin-top: 12px;
}

.payment-field-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.payment-field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.payment-copy-btn {
  flex-shrink: 0;
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--link);
  cursor: pointer;
}

.payment-copy-btn:active {
  opacity: 0.7;
}

.payment-field-value {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text);
  word-break: break-all;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.payment-field-value.is-copied {
  background: var(--primary-subtle);
  border-color: var(--primary);
  color: var(--primary-hover);
}

.payment-field-value--memo {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.payment-note {
  margin: 14px 0 16px;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.payment-check-btn {
  width: 100%;
}

.payment-error {
  margin: 10px 0 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--danger);
  text-align: center;
  line-height: 1.45;
}

.payment-success {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-top: 4px;
}

.payment-success-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  background: var(--primary-subtle);
  border: 1px solid #b7d9cd;
  border-radius: var(--radius);
}

.payment-success-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 1px;
}

.payment-success-msg {
  color: var(--primary-hover);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.45;
  text-align: left;
}

.submit-btn-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-size: 1rem;
}

.submit-btn-launch span {
  color: #fff;
}

.submit-btn-spinner {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  animation: spin 1s linear infinite;
}

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

#tokenCreatedSectionId {
  background: var(--primary-subtle) !important;
  border: 1px solid #b7d9cd !important;
  border-radius: var(--radius);
}

#tokenCreatedSectionId .bg-white {
  background: var(--surface) !important;
  border: 1px solid var(--border);
}

#tokenCreatedSectionId code {
  background: var(--bg) !important;
  border: 1px solid var(--border);
}

#tokenCreatedSectionId a { color: var(--link) !important; }

.toggle-checkbox:checked { right: 0; border-color: var(--primary); }
.toggle-checkbox:checked + .toggle-label { background-color: var(--primary); }

#toggleOrgInfo {
  background: var(--bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
}

#orgInfoFields {
  background: var(--bg) !important;
  border-color: var(--border) !important;
}

#localStoragePopup .bg-white {
  background: var(--surface) !important;
  border: 1px solid var(--border);
}

#localStoragePopup button {
  background: var(--primary) !important;
  border-radius: var(--radius) !important;
}

sub { color: var(--danger) !important; }

.final-cta {
  text-align: center;
  padding: 48px 24px;
  margin-bottom: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.final-cta h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.final-cta p {
  color: var(--text-muted);
  margin-bottom: 20px;
}

#errorPaymentMessageId { color: var(--danger) !important; font-size: 0.875rem !important; }

.dns-alert {
  background: #f0f5ff;
  border: 1px solid #b4c6e7;
  color: var(--text-muted);
  padding: 16px;
  border-radius: var(--radius);
  font-size: 0.875rem;
}

.dns-alert p:first-child { color: var(--text); font-weight: 600; margin-bottom: 8px; }

/* Host input (token subdomain) */
.host-input-row {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.host-input-row .form-input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
  flex: 1;
  min-width: 0;
}

.host-input-suffix {
  display: flex;
  align-items: center;
  padding: 0 12px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.8125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 45%;
}

@media (max-width: 480px) {
  .host-input-row {
    flex-direction: column;
  }

  .host-input-row .form-input {
    border-radius: var(--radius);
    border-right: 1px solid var(--border-strong);
  }

  .host-input-suffix {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    max-width: none;
    justify-content: center;
    padding: 8px 12px;
    margin-top: 6px;
    font-size: 0.75rem;
  }
}
