/* Settings page, sign-in view, people list, and the signed-out page chrome. */

/* ------------------------------------------------------------------ page */

.settings-page {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
}

.settings-subhead {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}

.settings-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

/* ------------------------------------------------------------------ files */

.settings-files {
  flex-flow: row wrap;
  align-items: center;
  gap: 16px 24px;
}

.settings-files__btn {
  flex: 0 0 auto;
  min-width: 148px;
  font-size: 16px;
}

.settings-files__text {
  display: flex;
  flex: 1 1 260px;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.settings-files__summary {
  color: var(--faint);
  font-size: 13px;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------------- people */

.settings-people__list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.settings-people__rows {
  align-self: stretch;
}

.settings-avatar {
  border-radius: 999px;
  background: var(--soft-2);
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.settings-person__name {
  min-width: 0;
  font-weight: 450;
}

/* The one-time message with a new password. */
.settings-message {
  min-height: 136px;
  font-size: 14.5px;
  resize: none;
}

.settings-message__hint {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

/* ----------------------------------------------------------- your account */

.settings-inline {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 520px;
}

.settings-inline > .field {
  flex: 1 1 auto;
}

.settings-inline > .btn {
  height: 48px;
}

.settings-account .settings-password {
  max-width: 520px;
}

.settings-account .form-error {
  text-align: left;
}

.settings-account__password,
.settings-account__foot {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.settings-account__foot {
  display: flex;
}

/* ------------------------------------------------------------- sign-in page */

.login-view {
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  padding: 24px 0 48px;
}

.login-card {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 32px;
  border: 1px solid var(--line);
  border-radius: 34px;
  background: var(--bg);
}

.login-card__orb {
  width: 88px;
  height: 88px;
  margin: -8px auto -6px;
}

.login-card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.login-card__title {
  font-size: 22px;
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}

.login-card__lede {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  text-wrap: balance;
}

.login-card__message {
  padding: 10px 16px;
  border-radius: 16px;
  background: var(--soft-2);
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

/* A new Deck Library: how the first admin account is made. */
.login-card__setup {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--soft-1);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.login-card__command {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
  user-select: all;
}

/* A password field with a show / hide button inside it (also used on Settings). */
.login-password {
  position: relative;
  display: flex;
}

.login-password__input {
  padding-right: 52px;
}

.login-password__input::-ms-reveal {
  display: none;
}

.login-password__toggle {
  position: absolute;
  top: 4px;
  right: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--faint);
  cursor: pointer;
  transition: background 0.15s var(--ease-std), color 0.15s var(--ease-std);
}

.login-password__toggle:hover {
  background: var(--soft-2);
  color: var(--ink);
}

.login-password__toggle svg {
  width: 18px;
  height: 18px;
}

/* Signed out (or the server can't be reached): only the logo and the theme switch stay. */
/* Signed out, and choosing a first password: the card alone on a blank page. */
html.is-signed-out .topbar,
html.is-signed-out .footer {
  display: none;
}

/* Until the sign-in is checked, nothing shows (no flash of the library). */
html.is-booting .page {
  visibility: hidden;
}

/* ------------------------------------------------------------------ phones */

@media (max-width: 560px) {
  .settings-page {
    gap: 16px;
  }

  .settings-files {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-files__text {
    flex-basis: auto;
  }

  .settings-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-inline > .btn {
    height: 44px;
  }

  .login-view {
    align-items: flex-start;
    padding: 8px 0 24px;
  }

  .login-card {
    padding: 12px 4px 8px;
    border: 0;
    border-radius: 0;
  }
}
