/* ============================================================
   company-registration.css
   Additive styling for company-registration.html only. Everything
   here is either a class that does not exist in paatheya.css
   (.field-hint, .reg-note, .color-field, .form-error) or a
   narrowly-scoped override the 5-step wizard needs, guarded by
   #reg-form so join.html's 3-step wizard is untouched.
   ============================================================ */

.field-hint {
  display: block;
  margin-top: .38rem;
  font-size: .8rem;
  line-height: 1.4;
  color: var(--ink-3);
}

/* Four indicators do not fit at the 3-step sizing on narrow screens, so the
   dots and connectors shrink. Scoped to this page's wizard only. */
.wizard:has(#reg-form) .wizard-steps .sline { width: 34px; margin: 0 .45rem; }
.wizard:has(#reg-form) .form-step-indicator .sdot { width: 34px; height: 34px; font-size: .92rem; }

/* Fallback for browsers without :has() — the wizard-steps block on this page
   carries .steps-compact (added by company-registration.js on load). */
.wizard-steps.steps-compact .sline { width: 34px; margin: 0 .45rem; }
.wizard-steps.steps-compact .form-step-indicator .sdot { width: 34px; height: 34px; font-size: .92rem; }

/* Reassurance / warning callout — used for the "we never ask for a password"
   note. Orange-tinted so it reads as important rather than decorative. */
.reg-note {
  margin-top: 1.4rem;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  background: var(--orange-tint);
  border-left: 3px solid var(--orange);
  color: #6B3A17;
  font-size: .9rem;
  line-height: 1.55;
}
.reg-note strong { color: var(--orange-deep); }

/* Native colour swatch sitting flush against the hex text input, so the two
   read as one control. */
.color-field { display: flex; align-items: stretch; gap: .6rem; }
.color-field input[type="color"] {
  flex: 0 0 54px;
  width: 54px;
  padding: 4px;
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--r-sm);
  background: var(--cream);
  cursor: pointer;
}
.color-field .clay-input { flex: 1 1 auto; min-width: 0; }

/* Inline validation / submission error. Hidden until JS adds .show. */
.form-error {
  display: none;
  margin-top: 1rem;
  padding: .85rem 1.1rem;
  border-radius: var(--r-md);
  background: #FDE8EC;
  border-left: 3px solid var(--rose);
  color: #8C2438;
  font-size: .9rem;
  font-weight: 500;
}
.form-error.show { display: block; animation: popin .35s var(--ease-spring); }

/* A field that failed validation. Set as a class rather than an inline style
   so clearing it cannot clobber an author-specified border. */
.clay-input.invalid,
.clay-textarea.invalid {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(232, 96, 122, .10);
}

/* Buttons must not look clickable while a submission is in flight. */
#wz-next[disabled] { opacity: .6; pointer-events: none; }

/* select styled to match .clay-input, which only targets input/textarea. */
select.clay-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%237C86A6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.05rem center;
  padding-right: 2.6rem;
}

@media (max-width: 640px) {
  .wizard-steps.steps-compact .sline { width: 18px; margin: 0 .3rem; }
  .wizard-steps.steps-compact .form-step-indicator .sdot { width: 30px; height: 30px; font-size: .85rem; }
}

/* ============================================================
   Logo upload

   A styled wrapper around a hidden <input type="file"> rather than a
   custom control: the native input keeps keyboard access, the OS file
   picker and mobile "take a photo" for free, and the label/box below is
   purely presentational.
   ============================================================ */

.logo-drop {
  position: relative;
  display: block;
  width: 100%;
  padding: 1.5rem 1.2rem;
  border: 1.5px dashed var(--cream-deep);
  border-radius: var(--r-md);
  background: var(--cream);
  cursor: pointer;
  transition: border-color .22s var(--ease-out), background .22s var(--ease-out), box-shadow .22s var(--ease-out);
}
.logo-drop:hover,
.logo-drop:focus-visible {
  border-color: var(--cobalt);
  background: var(--cobalt-tint);
  outline: none;
}
/* Dragover is a separate state from hover — the pointer is not over the box
   in the usual sense during a drag, so :hover alone never fires. */
.logo-drop.dragging {
  border-color: var(--orange);
  background: var(--orange-tint);
  box-shadow: 0 0 0 4px rgba(238, 117, 51, .12);
}
.logo-drop.has-file { border-style: solid; background: var(--paper); cursor: default; }
.logo-drop.uploading { cursor: progress; }

/* The [hidden] attribute is styled by the UA as `display: none`, which any
   class selector setting `display` outranks — so `.ld-empty { display:flex }`
   silently defeats `<div class="ld-empty" hidden>` and both states render at
   once. Restate it with the weight to win. */
.logo-drop [hidden] { display: none !important; }

.ld-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; }
.ld-icon { color: var(--cobalt); line-height: 0; margin-bottom: .25rem; }
.ld-title { font-size: .95rem; font-weight: 600; color: var(--ink-2); }
.ld-title u { color: var(--cobalt); text-underline-offset: 3px; }
.ld-sub { font-size: .8rem; color: var(--ink-3); }

.ld-filled { display: flex; align-items: center; gap: .9rem; }
.ld-thumb {
  flex: 0 0 56px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--cream-deep);
  background: #fff;
  overflow: hidden;
}
/* contain, not cover: a logo cropped to fill its box is a broken logo. */
.ld-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

.ld-meta { display: flex; flex-direction: column; gap: .15rem; min-width: 0; flex: 1 1 auto; }
.ld-name {
  font-size: .92rem; font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ld-state { font-size: .8rem; color: var(--teal); font-weight: 600; }
.ld-state.error { color: var(--rose); }
.ld-state.busy { color: var(--ink-3); }

.ld-remove {
  flex: 0 0 auto;
  border: 1px solid var(--cream-deep);
  background: var(--cream);
  color: var(--ink-2);
  font: inherit; font-size: .82rem; font-weight: 600;
  padding: .42em 1em;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background .2s var(--ease-out), color .2s var(--ease-out), border-color .2s var(--ease-out);
}
.ld-remove:hover { background: #FDE8EC; border-color: var(--rose); color: #8C2438; }

/* Indeterminate sweep, not a percentage: the upload is a single fetch() with
   no progress events, so a numeric bar would be a lie. */
.ld-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 3px; overflow: hidden;
  border-radius: 0 0 var(--r-md) var(--r-md);
  background: var(--cream-2);
}
.ld-bar span {
  display: block; width: 40%; height: 100%;
  background: var(--orange);
  animation: ldsweep 1.1s var(--ease-out) infinite;
}
@keyframes ldsweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ============================================================
   Verification step
   ============================================================ */

.verify-panel { text-align: center; padding: .6rem 0 .2rem; }
.verify-panel .ve {
  width: 68px; height: 68px; margin: 0 auto 1rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: var(--cobalt-tint);
  color: var(--cobalt);
}
.verify-panel h3 { margin-bottom: .4rem; }

.otp-row { display: flex; justify-content: center; gap: .5rem; margin: 1.5rem 0 .2rem; }
.otp {
  width: 52px; height: 62px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.55rem; font-weight: 600;
  color: var(--ink);
  border: 1.5px solid var(--cream-deep);
  border-radius: var(--r-sm);
  background: var(--cream);
  transition: border-color .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s var(--ease-out);
}
.otp:focus {
  outline: none;
  border-color: var(--cobalt);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(2, 55, 155, .12);
}
.otp.filled { border-color: var(--cobalt-soft); background: #fff; }
.otp-row.invalid .otp { border-color: var(--rose); }

#verify-error { text-align: left; }

/* A button that has to read as a link, because "send a new code" sits inside a
   sentence — an anchor would need a href it does not have. */
.linklike {
  border: 0; background: none; padding: 0;
  font: inherit; font-weight: 700;
  color: var(--orange-deep);
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.linklike[disabled] { color: var(--ink-3); cursor: default; text-decoration: none; }
.resend-status { display: inline-block; margin-left: .35rem; font-weight: 600; color: var(--teal); }
.resend-status.error { color: #8C2438; }

/* ============================================================
   Success — credentials summary
   ============================================================ */

.cred-card {
  max-width: 30rem;
  margin: 1.4rem auto 0;
  border: 1px solid var(--cream-deep);
  border-radius: var(--r-md);
  overflow: hidden;
  text-align: left;
  background: #fff;
}
.cc-row { display: flex; align-items: center; gap: 1rem; padding: .85rem 1.1rem; }
.cc-row + .cc-row { border-top: 1px solid var(--cream-deep); }
.cc-k { flex: 0 0 8rem; font-size: .82rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
.cc-v {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 1rem; font-weight: 600; color: var(--ink);
  overflow-wrap: anywhere;
}
.cc-v.muted { font-family: var(--font-body); font-weight: 500; color: var(--ink-2); }

.cred-note {
  max-width: 30rem;
  margin: .8rem auto 0;
  font-size: .86rem;
  line-height: 1.55;
  color: #6B3A17;
}

@media (max-width: 520px) {
  .otp-row { gap: .34rem; }
  .otp { width: 44px; height: 54px; font-size: 1.3rem; }
  .ld-filled { flex-wrap: wrap; }
  .ld-remove { margin-left: auto; }
}
