/* Zugang für Lehrkräfte: Auswahl, Registrierung, Anmeldung (Präfix .tauth-) */

.tauth-page {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.tauth-page-narrow {
  max-width: 720px;
}
.tauth-page > .page-header {
  margin-bottom: 0;
}
/* [hidden] muss auch bei Bausteinen mit eigener display-Angabe (z. B. .field) gelten */
.tauth-page [hidden] {
  display: none !important;
}

/* Umschalter Registrieren | Anmelden: zwei Felder auf einem Schild */
.tauth-switch {
  align-self: flex-start;
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  background: var(--c-surface);
  border: 2px solid var(--c-ink);
  border-radius: var(--radius-small);
}
.tauth-switch-link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 22px;
  border-radius: 2px;
  font-weight: 600;
  text-decoration: none;
  color: var(--c-text);
  transition: background-color var(--dur-fast) var(--ease-out);
}
.tauth-switch-link:hover {
  background: var(--c-accent-soft);
  color: var(--c-ink);
}
.tauth-switch-link[aria-current='page'] {
  background: var(--c-ink);
  color: #fff;
}

/* Auswahl: zwei Türschilder mit schwarzem Kopfband */
.tauth-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--c-surface);
  color: var(--c-text);
  text-decoration: none;
  transition:
    transform var(--dur) var(--ease-out),
    box-shadow var(--dur) var(--ease-out);
}
.tauth-choice:hover {
  color: var(--c-text);
}
@media (hover: hover) and (pointer: fine) {
  .tauth-choice:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
  }
}
.tauth-choice:active {
  transform: scale(0.985);
}
.tauth-choice:focus-visible {
  box-shadow: var(--focus);
}
.tauth-choice-head {
  display: flex;
  align-items: center;
  gap: 14px;
  align-self: stretch;
  padding: 16px 22px;
  background: var(--c-ink);
  color: #fff;
}
.tauth-choice-login .tauth-choice-head {
  background: var(--c-wall);
}
.tauth-choice-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-small);
  background: var(--c-accent);
  color: var(--c-ink);
  font-size: 1.5rem;
  line-height: 1;
}
.tauth-choice-login .tauth-choice-icon {
  background: #fff;
}
.tauth-choice-title {
  font-size: 2.3rem;
  line-height: 1;
  margin: 0;
}
.tauth-choice-for {
  padding: 18px 22px 0;
  font-weight: 700;
  font-size: 1.05rem;
}
.tauth-choice-text {
  flex: 1;
  margin: 4px 0 0;
  padding: 0 22px;
  color: var(--c-muted);
}
.tauth-choice-cta {
  pointer-events: none;
  margin: 18px 22px 22px;
}

/* Hinweis „Sie sind angemeldet als …“ */
.tauth-session {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.tauth-session-text {
  margin: 0;
}

/* Formulare */
.tauth-form {
  display: flex;
  flex-direction: column;
}
.tauth-form .form-actions {
  margin-top: 20px;
}
.tauth-status:not(:empty) {
  margin-top: 16px;
}
.tauth-status > .alert p {
  margin: 0;
}
.tauth-actions .btn {
  white-space: normal;
  text-align: center;
}
.tauth-code-input {
  font-family: var(--font-code);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}
/* Anmelden mit Daten: „Passwort merken“ und Links unter den Feldern */
.tauth-form > .cloud-remember {
  margin-top: 14px;
}
.tauth-login-links {
  margin: 12px 0 0;
}
.tauth-alt {
  margin: 0;
  text-align: center;
  color: var(--c-muted);
}
.tauth-alt a {
  font-weight: 600;
}

/* Anmelden: zwei Wege */
.tauth-ways {
  align-items: stretch;
}
.tauth-way {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
/* Kopf: kleines gelbes Schild „Möglichkeit 1“ in einer Zeile mit der Überschrift */
.tauth-way-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}
.tauth-way-head h2 {
  margin: 0;
}
.tauth-way-num {
  flex: none;
  padding: 3px 8px 2px;
  border-radius: var(--radius-small);
  background: var(--c-accent);
  color: var(--c-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
}
.tauth-way > p {
  margin: 0 0 4px;
}
.tauth-way .tauth-status:not(:empty) {
  margin-top: 4px;
}
/* Tablets: beide Karten nebeneinander sind schmal – Felder dann untereinander */
@media (min-width: 721px) and (max-width: 900px) {
  .tauth-way .form-grid {
    grid-template-columns: 1fr;
  }
}
.tauth-way > .tauth-tip {
  margin: 0;
}
.tauth-checking {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}
.tauth-spinner {
  border-color: var(--c-primary-soft);
  border-top-color: var(--c-primary);
}

/* Erfolgsansicht */
.tauth-success-head {
  display: flex;
  align-items: center;
  gap: 16px;
}
.tauth-success-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--c-success);
  color: #fff;
  font-size: 1.8rem;
}
.tauth-success-title {
  margin: 0;
}
.tauth-success-title:focus,
.tauth-success-title:focus-visible {
  outline: none;
  box-shadow: none;
}
.tauth-success-head .subtitle {
  margin: 4px 0 0;
}

.tauth-codes {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 16px;
}
.tauth-code-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  border: 2px solid #e2b400;
  border-radius: var(--radius-small);
  background: #fff4b3;
}
.tauth-code-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--c-accent-text);
}
.tauth-code-value {
  font-family: var(--font-code);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--c-text);
  overflow-wrap: anywhere;
}
.tauth-code-box-main .tauth-code-value {
  font-size: 2rem;
}
.tauth-code-hint {
  font-size: 0.85rem;
  color: var(--c-muted);
}

.tauth-download {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
}
.tauth-download-text {
  flex: 1 1 280px;
}
.tauth-download-text p {
  margin: 0;
}
.tauth-download .btn {
  flex: none;
}
.tauth-page > .tauth-actions {
  margin-top: 0;
}

.tauth-summary-card > h2 {
  font-size: 1.35rem;
}
.tauth-summary {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 6px 20px;
  margin: 0;
}
.tauth-summary dt {
  color: var(--c-muted);
}
.tauth-summary dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .tauth-codes {
    grid-template-columns: 1fr;
  }
  .tauth-code-box-main .tauth-code-value {
    font-size: 1.75rem;
  }
}

@media (max-width: 560px) {
  .tauth-page {
    gap: 16px;
  }
  .tauth-switch {
    align-self: stretch;
  }
  .tauth-switch-link {
    flex: 1;
    justify-content: center;
    padding: 6px 12px;
  }
  .tauth-choice-head {
    padding: 14px 18px;
  }
  .tauth-choice-for {
    padding: 16px 18px 0;
  }
  .tauth-choice-text {
    padding: 0 18px;
  }
  .tauth-choice-cta {
    align-self: stretch;
    margin: 16px 18px 18px;
  }
  .tauth-actions .btn,
  .tauth-download .btn {
    width: 100%;
  }
  .tauth-summary {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .tauth-summary dd {
    margin-bottom: 8px;
  }
}
