/* Merchant onboarding — Figma Merchant Dashboard tokens */
:root {
  --mo-surface-bg: #ffffff;
  --mo-surface-accent: #faf9f6;
  --mo-surface-action: #fbdb65;
  --mo-surface-disabled: #c3bead;
  --mo-border-primary: #979485;
  --mo-border-secondary: #c3bead;
  --mo-text-primary: #1a1c21;
  --mo-text-muted: #706d63;
  --mo-text-muted-1: #4b4942;
  --mo-input-radius: 10px;
  --mo-button-radius: 10px;
  --mo-success: #2e7d32;
  --mo-error: #d32f2f;
  --mo-card-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  --mo-card-pad-x: 36px;
  --mo-vh: 100dvh;
}

html, body {
  height: 100%;
  height: var(--mo-vh, 100dvh);
}

.mo-page {
  font-family: Poppins, Quicksand, sans-serif;
  background: var(--mo-surface-accent);
  height: var(--mo-vh, 100dvh);
  max-height: var(--mo-vh, 100dvh);
  color: var(--mo-text-primary);
  width: 100%;
  max-width: none;
  margin: 0;
  overflow: hidden;
}

.mo-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  height: var(--mo-vh, 100dvh);
  max-height: var(--mo-vh, 100dvh);
  max-width: none;
  margin: 0;
}

.mo-form-col {
  background: var(--mo-surface-accent);
  height: var(--mo-vh, 100dvh);
  max-height: var(--mo-vh, 100dvh);
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  /* Top/bottom margin when the card fits the viewport */
  padding: 24px 40px 32px;
}

.mo-form-scroll {
  width: 558px;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.mo-card {
  background: var(--mo-surface-bg);
  border: 1px solid var(--mo-border-secondary);
  border-radius: 10px;
  box-shadow: var(--mo-card-shadow);
  width: 558px;
  max-width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  padding: 0;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mo-form-scroll.mo-form-scroll--otp,
.mo-card.mo-card--otp {
  width: 680px;
}

.mo-card-top {
  position: relative;
  flex-shrink: 0;
  padding: 28px var(--mo-card-pad-x) 0;
  background: var(--mo-surface-bg);
  z-index: 2;
  box-sizing: border-box;
}

.mo-card-top--minimal {
  padding-top: 16px;
  min-height: 40px;
}

.mo-card--centered .mo-card-scroll {
  display: flex;
  flex-direction: column;
}

.mo-card--centered .mo-panel--center.is-active {
  flex: 1 1 auto;
}

.mo-card-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 var(--mo-card-pad-x) 24px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--mo-border-secondary) #ffffff;
}

.mo-card-scroll::-webkit-scrollbar {
  width: 6px;
}

.mo-card-scroll::-webkit-scrollbar-button,
.mo-card-scroll::-webkit-scrollbar-button:start:decrement,
.mo-card-scroll::-webkit-scrollbar-button:end:increment,
.mo-card-scroll::-webkit-scrollbar-button:vertical:start:decrement,
.mo-card-scroll::-webkit-scrollbar-button:vertical:end:increment,
.mo-card-scroll::-webkit-scrollbar-button:vertical:start:increment,
.mo-card-scroll::-webkit-scrollbar-button:vertical:end:decrement {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.mo-card-scroll::-webkit-scrollbar-track {
  background: #ffffff;
}

.mo-card-scroll::-webkit-scrollbar-thumb {
  background: var(--mo-border-secondary);
  border-radius: 6px;
}

.mo-card-scroll::-webkit-scrollbar-thumb:hover {
  background: var(--mo-border-primary);
}

.mo-card-scroll::-webkit-scrollbar-corner {
  background: #ffffff;
}

.mo-card-header {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  min-height: 40px;
}

.mo-back {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 5;
  width: 40px;
  height: 40px;
  border: 1px solid var(--mo-border-secondary);
  border-radius: 10px;
  background: #fff;
  color: var(--mo-text-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.mo-back:hover {
  background: var(--mo-surface-accent);
}

.mo-back svg {
  width: 20px;
  height: 20px;
}

.mo-back.mo-hidden {
  display: none !important;
}

.mo-logo {
  display: block;
  width: 140px;
  height: auto;
  margin: 0 auto;
}

.mo-stepper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 0;
  margin: 0 auto 20px;
  width: 100%;
  max-width: 368px;
  padding: 0;
  box-sizing: border-box;
  position: relative;
}

.mo-stepper::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 18%;
  right: 18%;
  height: 1px;
  background: var(--mo-border-secondary);
  z-index: 0;
}

.mo-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  text-align: center;
}

.mo-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  background: var(--mo-surface-disabled);
  color: var(--mo-text-muted-1);
}

.mo-step.is-active .mo-step-dot,
.mo-step.is-done .mo-step-dot {
  background: var(--mo-surface-action);
  color: var(--mo-text-primary);
}

.mo-step-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  max-width: 112px;
}

.mo-title {
  font-size: 20px;
  font-weight: 600;
  line-height: 26px;
  margin: 0 0 4px;
}

.mo-subtitle {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: var(--mo-text-muted);
  margin: 0 0 24px;
}

.mo-fields {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mo-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
}

.mo-field-error {
  display: none;
  margin-top: 2px;
  color: var(--mo-error);
  font-size: 12px;
  line-height: 16px;
}

.mo-field.is-error .mo-field-error {
  display: block;
}

.mo-field.is-error > .mo-input,
.mo-field.is-error > .mo-password-wrap .mo-input,
.mo-field.is-error > .mo-select-trigger {
  border-color: var(--mo-error) !important;
}

.mo-field.is-error > .mo-label {
  color: var(--mo-error);
}

.mo-validation-summary {
  display: none;
  margin: -12px 0 20px;
  padding: 10px 12px;
  border-left: 3px solid var(--mo-error);
  background: #fff4f4;
  color: var(--mo-error);
  font-size: 13px;
  line-height: 18px;
}

.mo-validation-summary.is-visible {
  display: block;
}

.mo-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mo-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  color: var(--mo-text-primary);
}

.mo-hint {
  font-size: 12px;
  line-height: 16px;
  color: var(--mo-text-primary);
}

.mo-input,
.mo-select-trigger {
  width: 100%;
  height: 48px;
  border: 1px solid var(--mo-border-primary);
  border-radius: var(--mo-input-radius);
  padding: 12px 16px;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  color: var(--mo-text-primary);
  background: #fff;
  box-sizing: border-box;
  outline: none;
}

.mo-input::placeholder {
  color: var(--mo-text-muted);
}

.mo-input:focus,
.mo-select-trigger:focus {
  border-color: var(--mo-text-primary);
}

.mo-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  text-align: left;
}

.mo-select-trigger .mo-placeholder {
  color: var(--mo-text-muted);
}

.mo-select-trigger .mo-chevron {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  opacity: 0.7;
}

.mo-password-wrap {
  position: relative;
}

.mo-password-wrap .mo-input {
  padding-right: 48px;
}

.mo-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 4px;
  color: var(--mo-text-muted);
}

.mo-dropdown {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 20;
  background: #fff;
  border: 1px solid var(--mo-border-primary);
  border-radius: var(--mo-input-radius);
  box-shadow: var(--mo-card-shadow);
  max-height: 268px;
  overflow-y: auto;
  padding: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--mo-border-secondary) #ffffff;
}

.mo-dropdown.is-open {
  display: block;
  position: fixed;
  z-index: 2000;
}

.mo-dropdown::-webkit-scrollbar {
  width: 6px;
}

.mo-dropdown::-webkit-scrollbar-button,
.mo-dropdown::-webkit-scrollbar-button:start:decrement,
.mo-dropdown::-webkit-scrollbar-button:end:increment,
.mo-dropdown::-webkit-scrollbar-button:vertical:start:decrement,
.mo-dropdown::-webkit-scrollbar-button:vertical:end:increment,
.mo-dropdown::-webkit-scrollbar-button:vertical:start:increment,
.mo-dropdown::-webkit-scrollbar-button:vertical:end:decrement {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.mo-dropdown::-webkit-scrollbar-track {
  background: #ffffff;
}

.mo-dropdown::-webkit-scrollbar-thumb {
  background: var(--mo-border-secondary);
  border-radius: 6px;
}

.mo-dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 24px;
}

.mo-dropdown-option:hover {
  background: var(--mo-surface-accent);
}

.mo-dropdown-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--mo-surface-action);
}

.mo-password-rules {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.mo-rule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  line-height: 16px;
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid var(--mo-border-secondary);
  color: var(--mo-text-muted);
  background: #fff;
}

.mo-rule.is-met {
  border-color: var(--mo-success);
  color: var(--mo-success);
  background: #f1f8f2;
}

.mo-rule-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
}

.mo-divider {
  border: 0;
  border-top: 1px solid var(--mo-border-secondary);
  margin: 24px 0;
}

.mo-btn {
  width: 100%;
  height: 56px;
  border: 0;
  border-radius: var(--mo-button-radius);
  background: var(--mo-surface-action);
  color: var(--mo-text-primary);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mo-btn:disabled {
  background: var(--mo-surface-disabled);
  color: var(--mo-text-muted-1);
  opacity: 1;
  cursor: not-allowed;
}

.mo-btn-link {
  display: block;
  text-align: center;
  width: 100%;
  margin: 12px 0;
  color: var(--mo-text-muted);
  font-size: 0.875rem;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: 0;
  font-family: inherit;
}

.mo-otp-change-number {
  display: inline-block;
  margin: -18px 0 24px;
  color: var(--mo-text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  text-decoration: underline;
}

.mo-otp-box {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ede9d9;
  border-radius: 10px;
  padding: 24px;
  background: #fff;
}

.mo-otp-inner {
  width: 100%;
  margin: 0 auto;
}

.mo-otp-section-label {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
}

.mo-pin-input-container {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.mo-pin-input {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  max-width: 97px;
  height: 78px;
  box-sizing: border-box;
  padding: 0;
  border: 1px solid var(--mo-border-secondary);
  border-radius: 16px;
  outline: none;
  background: var(--mo-surface-accent);
  color: var(--mo-text-primary);
  font-family: inherit;
  font-size: 24px;
  font-weight: 600;
  text-align: center;
  caret-color: transparent;
}

.mo-pin-input:hover {
  border-color: var(--mo-surface-action);
}

.mo-pin-input:focus {
  border: 2px solid var(--mo-surface-action);
}

.mo-pin-input:disabled {
  opacity: 0.55;
}

.mo-otp-expiry-wrap {
  width: 100%;
  margin-top: 32px;
}

.mo-otp-progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede9d9;
}

.mo-otp-progress-fill {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: var(--mo-surface-action);
  transition: width 1s linear;
}

.mo-otp-expiry {
  margin-top: 8px;
  color: var(--mo-text-primary);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}

.mo-otp-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding-top: 24px;
}

.mo-otp-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  box-sizing: border-box;
  padding: 8px 16px;
  border: 1px solid var(--mo-border-primary);
  border-radius: 10px;
  background: #fff;
  color: var(--mo-text-muted);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}

.mo-otp-action:hover:not(:disabled) {
  background: var(--mo-surface-accent);
}

.mo-otp-action:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.mo-privacy {
  display: block;
  text-align: center;
  margin-top: 8px;
  margin-bottom: 0;
  padding: 0;
  font-size: 12px;
  line-height: 16px;
  color: var(--mo-text-primary);
  text-decoration: underline;
  box-sizing: border-box;
}

.mo-hero {
  width: 100%;
  height: var(--mo-vh, 100dvh);
  max-height: var(--mo-vh, 100dvh);
  overflow: hidden;
  background: #111;
  position: relative;
}

.mo-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom;
  display: block;
}

.mo-panel {
  display: none;
  flex-direction: column;
}

.mo-panel.is-active {
  display: flex;
}

.mo-panel-body {
  padding: 0;
  overflow: visible;
}

.mo-panel-footer {
  padding: 0;
  box-sizing: border-box;
}

.mo-panel-footer .mo-divider {
  margin-top: 16px;
  margin-bottom: 12px;
}

.mo-panel--center.is-active {
  min-height: 100%;
  justify-content: center;
}

.mo-panel--center .mo-panel-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mo-status {
  text-align: center;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--mo-text-muted);
}

.mo-center {
  text-align: center;
  padding: 16px 0;
}

.mo-success-icon,
.mo-info-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--mo-surface-action);
  color: var(--mo-text-primary);
  font-size: 32px;
  font-weight: 700;
}

.mo-success-icon {
  background: var(--mo-success);
  color: #fff;
}

.mo-info-icon {
  background: var(--mo-surface-disabled);
  color: var(--mo-text-primary);
}

.mo-ads-block .mo-title {
  font-size: 18px;
  font-weight: 500;
}

.mo-hidden {
  display: none !important;
}

@media (max-width: 900px) {
  .mo-layout {
    grid-template-columns: 1fr;
  }

  .mo-hero {
    display: none;
  }

  .mo-form-col {
    height: var(--mo-vh, 100dvh);
    max-height: var(--mo-vh, 100dvh);
    padding: 0;
    margin: 0;
    overflow: hidden;
  }

  .mo-form-scroll {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    height: 100%;
  }

  .mo-card {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    height: 100%;
    padding: 0;
  }

  .mo-card-top {
    padding: 28px var(--mo-card-pad-x) 0;
  }

  .mo-card-scroll {
    padding: 0 var(--mo-card-pad-x) calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .mo-panel-footer {
    padding-bottom: 0;
  }

  .mo-back {
    top: 12px;
    left: 12px;
  }

  .mo-field-row {
    grid-template-columns: 1fr;
  }

  .mo-stepper::before {
    left: 12%;
    right: 12%;
  }
}

@media (min-width: 640px) {
  .mo-otp-box {
    padding: 32px;
  }

  .mo-pin-input-container {
    gap: 20px;
  }

  .mo-pin-input {
    height: 92px;
    font-size: 32px;
  }
}
