/* ==========================================
   ONZE KEUKEN - GLOBAL AUTH V1
   ========================================== */

body.auth-pending .app,
body.auth-locked .app {
  display: none !important;
}

body.auth-ready .auth-root {
  display: none !important;
}

.auth-root {
  min-height: 100vh;

  display: grid;
  place-items: center;

  padding: 28px 18px;

  background: var(--bg);
}

.auth-shell {
  width: min(100%, 470px);
}

.auth-brand {
  margin-bottom: 22px;

  text-align: center;
}

.auth-brand-icon {
  width: 70px;
  height: 70px;

  display: grid;
  place-items: center;

  margin: 0 auto 14px;

  border-radius: 23px;

  background: white;
  box-shadow: var(--shadow);

  font-size: 38px;
}

.auth-brand h1 {
  margin: 0;

  font-size: 34px;
  line-height: 1.05;
}

.auth-brand p {
  margin: 8px 0 0;

  color: var(--muted);

  font-size: 15px;
}

.auth-card {
  padding: 30px;

  border-radius: 28px;

  background: white;
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0 0 5px;

  font-size: 25px;
}

.auth-card-intro {
  margin: 0 0 23px;

  color: var(--muted);

  font-size: 15px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field span {
  font-size: 14px;
  font-weight: 850;
}

.auth-field input {
  width: 100%;
  height: 54px;

  border: 2px solid var(--border);
  border-radius: 16px;

  padding: 0 16px;

  outline: none;

  background: white;
  color: var(--text);

  font-size: 16px;
}

.auth-field input:focus {
  border-color: var(--accent);
}

.auth-submit {
  min-height: 54px;

  margin-top: 3px;

  border: 0;
  border-radius: 16px;

  padding: 0 20px;

  background: var(--accent);
  color: white;

  font-size: 16px;
  font-weight: 850;
}

.auth-submit:disabled {
  opacity: .55;
  cursor: default;
}

.auth-error {
  min-height: 22px;

  margin-top: 13px;

  color: #a33b2b;

  font-size: 14px;
  font-weight: 750;
}

.auth-loading {
  padding: 30px;

  border-radius: 25px;

  background: white;
  box-shadow: var(--shadow);

  color: var(--muted);

  text-align: center;
  font-weight: 750;
}


/* ------------------------------------------
   Ingelogde gebruiker in header
   ------------------------------------------ */

.auth-user {
  margin-left: auto;

  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-user-name {
  color: var(--muted);

  font-size: 14px;
  font-weight: 800;
}

.auth-logout {
  min-height: 40px;

  border: 0;
  border-radius: 13px;

  padding: 0 13px;

  background: var(--surface-soft);
  color: var(--muted);

  font-size: 14px;
  font-weight: 800;
}


@media (max-width: 650px) {
  .auth-root {
    align-items: start;

    padding-top:
      max(
        35px,
        env(safe-area-inset-top)
      );
  }

  .auth-card {
    padding: 23px 19px;
  }

  .auth-brand h1 {
    font-size: 30px;
  }

  .auth-user-name {
    display: none;
  }
}


/* ==========================================
   ACCOUNT LINK
   ========================================== */

.auth-account {
  border: 0;

  padding: 8px 10px;

  background: transparent;
  color: var(--muted);

  cursor: pointer;
}

.auth-account:hover {
  background: var(--surface-soft);
}

.auth-account-icon {
  margin-right: 4px;
}


@media (max-width: 650px) {
  .auth-account {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    padding: 0;

    border-radius: 13px;

    background: var(--surface-soft);

    font-size: 19px;
  }

  .auth-account-icon {
    margin: 0;
  }

  .auth-account-label {
    display: none;
  }
}


/* ==========================================
   PUBLIC AUTH V2
   Registreren + password recovery
   ========================================== */

.auth-login-links {
  display: flex;
  justify-content: center;

  margin-top: 14px;
}


.auth-link-button,
.auth-back-link {
  appearance: none;

  border: 0;

  background: transparent;

  color: var(--accent-dark);

  font: inherit;
  font-size: 14px;
  font-weight: 800;

  cursor: pointer;
}


.auth-link-button:hover,
.auth-back-link:hover {
  text-decoration: underline;
}


.auth-divider {
  display: grid;

  grid-template-columns:
    1fr auto 1fr;

  align-items: center;

  gap: 11px;

  margin:
    18px
    0;
}


.auth-divider::before,
.auth-divider::after {
  content: "";

  height: 1px;

  background:
    var(--border);
}


.auth-divider span {
  color: var(--muted);

  font-size: 12px;
  font-weight: 700;
}


.auth-secondary-button {
  width: 100%;
  min-height: 52px;

  border:
    1px
    solid
    var(--border);

  border-radius: 16px;

  background:
    var(--surface-soft);

  color: var(--text);

  font: inherit;
  font-size: 15px;
  font-weight: 850;

  cursor: pointer;
}


.auth-secondary-button:hover {
  background: #f4ebe4;
}


.auth-back-link {
  display: block;

  margin:
    18px
    auto
    0;
}


.auth-field small {
  color: var(--muted);

  font-size: 12px;
}


.auth-error.auth-success {
  color: #5b7550;
}


/* ==========================================
   FAMILY INVITE AUTH V1
   ========================================== */

.auth-invite-notice {
  display: flex;
  align-items: center;

  gap: 12px;

  margin:
    0
    0
    20px;

  padding:
    14px;

  border:
    1px
    solid
    #ead7ca;

  border-radius: 16px;

  background:
    #fff6ef;
}


.auth-invite-icon {
  flex:
    0
    0
    42px;

  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border-radius: 13px;

  background: #fff;

  font-size: 21px;
}


.auth-invite-notice div:last-child {
  display: grid;
  gap: 3px;
}


.auth-invite-notice strong {
  font-size: 14px;
}


.auth-invite-notice span {
  color: var(--muted);

  font-size: 12px;
  line-height: 1.4;
}
