/* ==========================================================================
   Registrer – Søk om bruker tilgang
   Bygger på login.css (deler navbar, tilbake-lenke, input, label, felt)
   ========================================================================== */
@import url("login.css");

/* --------------------------------------------------------------------
   Side-layout
   -------------------------------------------------------------------- */
.reg-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-6);
}

/* --------------------------------------------------------------------
   Overskrift + ingress
   -------------------------------------------------------------------- */
.reg-header {
  width: 100%;
  max-width: 680px;
}

.reg-header__title {
  color: var(--color-blue-primary);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 2.625rem;
}

.reg-header__desc {
  color: #555;
  font-size: 0.9375rem;
  line-height: 1.5rem;
  padding-top: 12px;
}

/* --------------------------------------------------------------------
   Kortstruktur
   -------------------------------------------------------------------- */
.reg-card {
  max-width: 650px;
}

.reg-card__body {
  gap: var(--space-2);
}

.reg-required-note {
  font-size: 0.75rem;
  color: #89939e;
  font-family: var(--font-family-base);
}

.reg-footer-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reg-footer-links p {
  font-size: 0.75rem;
  color: #404040;
  line-height: 1.5rem;
  margin: 0;
}

.reg-footer-links a {
  color: #2b7fbd;
}

.reg-footer-links a:hover {
  text-decoration: underline;
}

/* Required asterisk */
.req {
  color: #fb2c36;
  margin-left: 1px;
}

/* Reuse login-input but slightly smaller for this form */
.reg-card .login-input {
  height: 42px;
  border-radius: 9px;
  padding: 0 14px;
}

.reg-card .login-field {
  gap: 5px;
}

/* --------------------------------------------------------------------
   Passordkrav
   -------------------------------------------------------------------- */
.passord-krav {
  background: white;
  border-radius: var(--radius-4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: var(--space-2) var(--space-7);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-1);
}

.passord-krav__divider {
  height: 1px;
  background: #e0e0e0;
  margin: var(--space-0) 0;
}

.passord-krav__item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-1) var(--space-2);
}

.passord-krav__item-text {
  font-size: 0.875rem;
  color: #717171;
  line-height: normal;
  font-family: var(--font-family-base);
  transition: color 0.15s;
}

/* Icon states */
.passord-krav__item .icon-disabled { display: block; }
.passord-krav__item .icon-ok       { display: none; }

.passord-krav__item--ok .icon-disabled { display: none; }
.passord-krav__item--ok .icon-ok       { display: block; }

.passord-krav__item--ok .passord-krav__item-text {
  color: #16a34a;
}

/* --------------------------------------------------------------------
   Submit-knapp i kortfoten
   -------------------------------------------------------------------- */
.reg-btn-submit {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  height: 44px;
  padding: 0 var(--space-5);
  background: var(--color-blue-primary);
  color: white;
  border: none;
  border-radius: var(--radius-5);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-family-base);
  cursor: pointer;
  transition: background 0.15s;
}

.reg-btn-submit:hover {
  background: #003260;
}

/* --------------------------------------------------------------------
   Feilmelding
   -------------------------------------------------------------------- */
.reg-error {
  color: #c0392b;
  font-size: 0.85rem;
  text-align: center;
  display: none;
  padding: 0 28px 12px;
}

/* --------------------------------------------------------------------
   Steg 2 – Bekreftelse
   -------------------------------------------------------------------- */
.bekreftelse {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-7);
  width: 100%;
}

.bekreftelse__card {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  min-height: 380px;
}

.bekreftelse__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ccebf7;
  border: 1px solid #abbed1;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.13), 0 0 0 1px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bekreftelse__title {
  color: var(--color-blue-primary);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 2.625rem;
  text-align: center;
}

.bekreftelse__desc {
  color: #555;
  font-size: 1rem;
  line-height: 1.625rem;
  text-align: center;
  padding-top: 2px;
}

.bekreftelse__info-boks {
  background: #fff8e6;
  border: 1px solid #fce08a;
  border-radius: var(--radius-6);
  width: 100%;
  max-width: 520px;
  padding: var(--space-4) var(--space-5);
  display: flex;
  gap: var(--space-2);
  align-items: flex-start;
}

.bekreftelse__info-boks-tekst {
  color: #7a5c00;
  font-size: 0.8125rem;
  line-height: 1.3125rem;
  font-family: var(--font-family-base);
}

.bekreftelse__info-boks-tekst strong {
  font-weight: 700;
}

.reg-btn-hjem {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 var(--space-5);
  background: var(--color-blue-primary);
  color: white;
  border-radius: var(--radius-5);
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-family-base);
  text-decoration: none;
  transition: background 0.15s;
}

.reg-btn-hjem:hover {
  background: #003260;
}

/* --------------------------------------------------------------------
   Kommuneoppslag-tilbakemelding under orgnr-felt
   -------------------------------------------------------------------- */
.reg-kommune-bekreftelse {
  font-size: 0.85rem;
  min-height: 1.2em;
  color: #89939e;
  font-family: var(--font-family-base);
}

.reg-kommune-bekreftelse--ok {
  color: #16a34a;
  font-weight: 500;
}

.reg-kommune-bekreftelse--feil {
  color: #c62828;
}

/* --------------------------------------------------------------------
   Responsiv
   -------------------------------------------------------------------- */
@media (max-width: 768px) {
  .reg-card .card__header {
    padding: var(--space-4) var(--space-5);
  }

  .reg-card__body {
    padding: var(--space-5) var(--space-4);
  }

  .reg-card .card__footer {
    padding: var(--space-4) var(--space-5);
  }

  .bekreftelse__card {
    padding: var(--space-5);
    min-height: auto;
  }

  .bekreftelse__title {
    font-size: 1.5rem;
    line-height: 2rem;
  }
}

@media (max-width: 700px) {
  .reg-body {
    padding: 0 0 var(--space-8);
  }

  .reg-header__title {
    font-size: 1.5rem;
  }

  .passord-krav {
    padding: var(--space-2) var(--space-4);
  }

  .reg-card .card__footer {
    flex-direction: column;
    gap: var(--space-3);
    align-items: stretch;
  }

  .reg-btn-submit {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 480px) {
  .reg-header__title {
    font-size: 1.375rem;
    line-height: 1.875rem;
  }

  .reg-header__desc {
    font-size: 0.875rem;
  }

  .bekreftelse__info-boks {
    padding: var(--space-3) var(--space-4);
  }

  .reg-btn-hjem {
    width: 100%;
    justify-content: center;
  }
}
