/* miapos-onboarding — page-specific styles for /en/onboarding/ */

.onb-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
  display: flex;
  gap: 8px;
  justify-content: center;
  font-size: 13px;
  color: var(--ink-500);
}
.onb-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,0.04);
  transition: background .25s, color .25s;
}
.onb-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(0,0,0,0.08);
  color: var(--ink-700, #333);
}
.onb-step--active {
  background: var(--teal-100, rgba(31, 179, 158, 0.12));
  color: var(--teal-700);
}
.onb-step--active .onb-step__num {
  background: var(--teal-500);
  color: #fff;
}
.onb-step--done {
  background: rgba(0,0,0,0.03);
  color: var(--ink-500);
}
.onb-step--done .onb-step__num {
  background: var(--teal-500);
  color: #fff;
}

.onb-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.04);
}

.onb-field {
  margin-bottom: 20px;
}
.onb-field:last-of-type { margin-bottom: 8px; }

.onb-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-900);
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.onb-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink-900);
  background: #fff;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
  -webkit-appearance: none;
  appearance: none;
}
.onb-input:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(31, 179, 158, 0.16);
}
.onb-input[aria-invalid="true"] {
  border-color: #d93025;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.14);
}

select.onb-input {
  padding-right: 40px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  cursor: pointer;
}

.onb-phone {
  display: flex;
  align-items: stretch;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.onb-phone:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(31, 179, 158, 0.16);
}
.onb-phone__cc {
  padding: 12px 12px;
  background: rgba(0,0,0,0.04);
  border-right: 1px solid rgba(0,0,0,0.08);
  font-family: var(--font-mono, monospace);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-700, #333);
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
}
.onb-input--phone {
  border: 0;
  border-radius: 0;
  flex: 1;
}
.onb-input--phone:focus { box-shadow: none; border: 0; }


.onb-hint {
  display: block;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--ink-500);
  line-height: 1.5;
}

.onb-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-500);
  line-height: 1.55;
  cursor: pointer;
}
.onb-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal-500);
  flex-shrink: 0;
  cursor: pointer;
}
.onb-check a { color: var(--teal-700); text-decoration: underline; }

/* --- Acceptance points ---------------------------------------------------
   A fieldset, not a div: the till count and the two channel boxes answer one
   question — where this merchant takes money — and a screen reader should hear
   them as such. */
.onb-accept {
  border: 1px solid var(--line-200, #e6e8eb);
  border-radius: 12px;
  padding: 16px;
  margin: 0 0 18px;
}
.onb-accept > legend {
  padding: 0 6px;
  margin-left: -6px;
}
.onb-label--sub {
  display: block;
  margin: 10px 0 6px;
  font-size: 13px;
  font-weight: 500;
}
/* The sentence the MCC is read off. Three rows is enough for the answer we
   want and short enough that nobody starts writing a company history; the
   vertical resize handle stays for the ones who do. */
textarea.onb-input--area {
  min-height: 5.5rem;
  line-height: 1.5;
  resize: vertical;
}

.onb-input--num {
  width: 7.5rem;
  /* A count is read at a glance; full-width would make it look like an id. */
}
.onb-check--inline {
  align-items: center;
  margin-top: 10px;
  font-size: 14px;
  color: var(--ink-700, #2b3138);
}

/* Says out loud that the fields above were answered for the applicant. A
   silent prefill would be worse than none: the merchant would submit numbers
   they never read, and the bank would provision against them. */
.onb-prefilled {
  margin: 12px 0 0;
  padding: 8px 12px;
  border-left: 3px solid var(--teal-400, #3aa392);
  background: var(--teal-050, #edf8f6);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-700, #2b3138);
}

/* The computed answer. Deliberately the loudest thing in the block: it is what
   the bank acts on, and the merchant must be able to object to it. */
.onb-terminals {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 0 6px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--teal-050, #edf8f6);
}
.onb-terminals__label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-700, #2b3138);
}
.onb-terminals__value {
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--teal-700, #0f7a68);
}

.onb-error {
  margin-top: 16px;
  padding: 10px 14px;
  background: rgba(217, 48, 37, 0.08);
  border: 1px solid rgba(217, 48, 37, 0.25);
  border-radius: 8px;
  font-size: 13px;
  color: #a52a1a;
  line-height: 1.5;
}
.onb-error[hidden] { display: none; }

.onb-submit {
  width: 100%;
  margin-top: 8px;
  background: var(--ink-900);
  color: #fff;
  justify-content: center;
}
.onb-submit:disabled {
  opacity: 0.55;
  cursor: wait;
}

.onb-legal {
  font-size: 11.5px;
  color: var(--ink-500);
  line-height: 1.55;
  margin-top: 14px;
  text-align: center;
}
.onb-legal a { color: var(--ink-500); text-decoration: underline; }



.onb-success {
  text-align: center;
}
.onb-success__icon {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: rgba(31, 179, 158, 0.12);
  color: var(--teal-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.onb-success h2 {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 10px;
}
.onb-success p { color: var(--ink-500); line-height: 1.6; margin: 0 0 14px; }
.onb-success .btn { margin-top: 12px; }

.onb-fallback {
  margin-top: 24px;
  padding: 16px 20px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  font-size: 14px;
  color: var(--ink-500);
  line-height: 1.55;
}
.onb-fallback a { color: var(--teal-700); text-decoration: underline; }

/* D10: hand-off out of the Configurator's done screen into activation. */
.bc-activate {
  margin: 20px 0 4px;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(0,0,0,0.03);
  border: 1px solid rgba(0,0,0,0.08);
  text-align: left;
}
.bc-activate p {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-500);
}

/* D10: shown when the applicant arrives from the Configurator. A quiet
   continuity cue, not a banner — the applicant already knows why they are here. */
.onb-handoff {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 3px solid var(--teal-700);
  background: rgba(0,0,0,0.02);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-500);
}

/* Says the phone could not be verified. Deliberately reads as a caveat, not an
   error: the application went through. */
.onb-note {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(180, 120, 0, 0.08);
  border: 1px solid rgba(180, 120, 0, 0.22);
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-500);
  text-align: left;
}

@media (max-width: 640px) {
  .onb-card { padding: 24px 20px; }
  .onb-steps { font-size: 12px; }
  .onb-step__label { display: none; }
}

/* Label + "?" on one line. The help is a <details> so keyboard and screen
   readers get open/close for free; no JS, and the content is in the HTML, so
   an agent reading the page without scripts still sees the country table. */
.onb-label-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.onb-label-row .onb-label { margin-bottom: 0; }

.onb-help { position: relative; }

.onb-help > summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.14);
  color: var(--ink-500);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  transition: border-color .15s ease, color .15s ease, background-color .15s ease;
}

.onb-help > summary::-webkit-details-marker { display: none; }

.onb-help > summary:hover,
.onb-help[open] > summary {
  border-color: var(--teal-500);
  color: var(--teal-500);
  background: rgba(31, 179, 158, 0.10);
}

.onb-help > summary:focus-visible {
  outline: 2px solid var(--teal-500);
  outline-offset: 2px;
}

.onb-help__panel {
  position: absolute;
  z-index: 20;
  top: calc(100% + 8px);
  left: 0;
  width: max-content;
  max-width: min(320px, 78vw);
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,0.14);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, .12);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-500);
}

/* The 8px between the "?" and the panel is not part of either element, so a
   pointer travelling down would leave .onb-help and trigger the close. This
   bridges the gap without moving the panel. */
.onb-help__panel::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}

.onb-help__panel p { margin: 0 0 8px; }
.onb-help__panel ul { margin: 0; padding-left: 18px; }
.onb-help__panel li + li { margin-top: 4px; }
.onb-help__panel strong { color: var(--ink-900); }

/* On a phone the panel cannot be anchored to the "?" at all: pinned left it
   runs off the right edge, pinned right it runs off the left. Anchor it to the
   label row instead, so it spans the field and always fits. */
@media (max-width: 520px) {
  .onb-help { position: static; }
  .onb-help__panel {
    left: 0;
    right: 0;
    width: auto;
    max-width: none;
  }
}

/* Hand-off to the activation form. Visible and cancellable on purpose: the
   applicant should see they are being moved and be able to refuse, and they
   must still register that the report itself arrives by email. */
.bc-handoff {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--teal-050, #edf8f6);
  font-size: 13.5px;
}
.bc-handoff__msg { color: var(--ink-700, #2b3138); }
.bc-handoff__now { font-weight: 600; }
.bc-handoff__stay {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--ink-500, #5b636b);
  text-decoration: underline;
  cursor: pointer;
}
.bc-handoff__stay:hover { color: var(--ink-700, #2b3138); }
