/* Global styles. Interactive pages use MudBlazor; the static account pages below use plain HTML forms. */

h1:focus {
  outline: none;
}

/* Counters on app bar buttons: MudBlazor puts an overlapping badge 8px above its button, which in the dense app bar
   is above the window. Keep it inside the bar. */
.mud-appbar .mud-badge.mud-badge-top.mud-badge-overlap {
  bottom: calc(100% - 22px);
}

#blazor-error-ui {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 0.6rem 1.25rem 0.7rem;
  background: #ffe9a8;
  box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

#blazor-error-ui .dismiss {
  cursor: pointer;
  position: absolute;
  right: 0.75rem;
  top: 0.5rem;
}

/* Account pages (static server rendering) */

.auth {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: #f4f5f7;
  font-family: Roboto, "Segoe UI", Arial, sans-serif;
  color: #1f2328;
}

.auth-card {
  width: 100%;
  max-width: 26rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 2rem;
}

.auth-brand {
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 1.5rem;
  color: #594ae2;
}

.auth h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}

.auth .field {
  display: block;
  margin-bottom: 1rem;
}

.auth .field span {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.auth input[type=text],
.auth input[type=email],
.auth input[type=password],
.auth input:not([type]) {
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border: 1px solid #c4c8cf;
  border-radius: 4px;
  font-size: 1rem;
}

.auth input:focus {
  outline: 2px solid #594ae2;
  outline-offset: 1px;
}

.auth .check {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}

.auth .btn {
  display: inline-block;
  border: 0;
  border-radius: 4px;
  padding: 0.65rem 1.25rem;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
}

.auth .btn.primary {
  width: 100%;
  background: #594ae2;
  color: #fff;
}

.auth .btn.danger {
  width: 100%;
  background: #c62828;
  color: #fff;
}

.auth .btn.link {
  background: none;
  color: #594ae2;
  padding: 0;
}

.auth .links {
  margin-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.auth a {
  color: #594ae2;
}

.auth .alert {
  padding: 0.75rem 1rem;
  border-radius: 4px;
  margin-bottom: 1rem;
}

.auth .alert.error {
  background: #fdecea;
  color: #8a1c1c;
}

.auth .alert.success {
  background: #e7f5ea;
  color: #1e5e2c;
}

.auth .alert.warning {
  background: #fff4e5;
  color: #6b4100;
}

.auth .choices,
.auth .actions,
.auth .codes {
  list-style: none;
  padding: 0;
}

.auth .choices li {
  margin-bottom: 0.5rem;
}

.auth .btn.choice {
  width: 100%;
  text-align: left;
  background: #f4f5f7;
  color: #1f2328;
}

.auth .choice.disabled {
  display: block;
  padding: 0.65rem 1.25rem;
  color: #6e7781;
}

.auth .codes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1rem;
  font-family: Consolas, monospace;
}

.auth .qr svg {
  width: 200px;
  height: 200px;
}

.culture-links {
  margin-top: 1rem;
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
  color: #6e7781;
}

.culture-links a {
  color: #594ae2;
}

.legal-link {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #594ae2;
}

/* The privacy policy is running text: a wider card than the sign-in forms. */
.auth-card:has(.legal) {
  max-width: 48rem;
}

.legal h2 {
  font-size: 1.125rem;
  margin: 1.5rem 0 0.5rem;
}

.legal p,
.legal ul {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.legal-updated {
  color: #6e7781;
  font-size: 0.875rem;
}

.drawer-footer {
  padding: 1rem;
  font-size: 0.8125rem;
}

.drawer-footer a {
  color: inherit;
}

/* One line with an ellipsis; the flex parent needs min-width: 0 for it to shrink. */
.noir-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

/* Help articles (ADR-0069): pictures fit the panel. */
.help-article h2 {
  font-size: 1.25rem;
  margin: 0.5rem 0 0.75rem;
}

.help-article img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.help-article p,
.help-article ul,
.help-article ol {
  margin: 0 0 0.75rem;
  line-height: 1.5;
}

.help-article ul,
.help-article ol {
  padding-left: 1.5rem;
}

.help-article h3 {
  font-size: 1.05rem;
  margin: 1rem 0 0.5rem;
}

/* Tables from the user documentation (ADR-0071). */
.help-article table {
  border-collapse: collapse;
  width: 100%;
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
}

.help-article th,
.help-article td {
  border-bottom: 1px solid var(--mud-palette-lines-default);
  padding: 0.35rem 0.5rem 0.35rem 0;
  text-align: left;
  vertical-align: top;
}
