/* css/auth.css — the staff sign-in curtain, shared by both pages.
   Same palette as the editor (dark slate + one amber accent) so it reads as
   part of the app on the laptop and as part of the prompter on the tablet.
   Deliberately old-Chrome friendly: no nesting, no :has(), no dvh/svh units. */

.tp-gate {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  z-index: 9000;                 /* above every prompter screen and the toast */
  background: #0b0f14;
  color: #e6edf3;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Landscape on a tablet leaves very little height once the on-screen
     keyboard is up, so the curtain scrolls rather than clipping the button. */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px 20px;
  text-align: left;
}

.tp-gate.is-open { display: block; }

.tp-gate-card {
  max-width: 380px;
  margin: 0 auto;
  /* A little breathing room on a laptop, none worth having on a short
     landscape tablet — so it is padding, not vertical centring. */
  padding-top: 6vh;
}

.tp-gate-logo {
  margin: 0 0 22px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9fb0c0;
  display: flex;
  align-items: center;
}

.tp-gate-mark {
  width: 0;
  height: 0;
  margin-right: 9px;
  border-left: 10px solid #f0b429;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
}

.tp-gate-status {
  margin: 0;
  padding: 14px 0;
  color: #7b8fa1;
  font-size: 14px;
}

.tp-gate-form {
  margin: 0;
  padding: 20px;
  background: #0e141b;
  border: 1px solid #1c2632;
  border-radius: 14px;
}

.tp-gate-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8496a8;
}

.tp-gate-input {
  display: block;
  width: 100%;
  min-height: 46px;
  margin-bottom: 16px;
  padding: 11px 13px;
  background: #0b0f14;
  border: 1px solid #24313f;
  border-radius: 9px;
  color: #ffffff;
  font-family: inherit;
  font-size: 16px;    /* 16px stops iOS/Android zooming the page on focus */
  line-height: 1.4;
}

.tp-gate-input:focus {
  outline: none;
  border-color: #f0b429;
  background: #101820;
}

.tp-gate-error {
  margin: 0 0 16px;
  padding: 10px 12px;
  background: #1c1012;
  border: 1px solid #7f1d1d;
  border-radius: 9px;
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.45;
}

.tp-gate-btn {
  display: block;
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  background: #f0b429;
  color: #17202a;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.tp-gate-btn:hover { background: #ffc63d; }
.tp-gate-btn:disabled { background: #35404b; color: #7f8b97; cursor: default; }

.tp-gate-alt {
  display: block;
  width: 100%;
  min-height: 44px;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid #24313f;
  border-radius: 9px;
  background: #16202b;
  color: #cfdae5;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp-gate-alt:hover { background: #1c2836; color: #ffffff; }

.tp-gate-foot {
  margin: 18px 0 0;
  color: #6d8296;
  font-size: 12px;
  text-align: center;
}

/* Short landscape (a tablet on its side, or a keyboard eating the viewport):
   drop the top offset so the button stays reachable without scrolling. */
@media (max-height: 520px) {
  .tp-gate { padding: 16px; }
  .tp-gate-card { padding-top: 0; }
  .tp-gate-logo { margin-bottom: 14px; }
  .tp-gate-form { padding: 16px; }
  .tp-gate-input { margin-bottom: 12px; }
}

/* --------------------------------------------------- editor header controls */

.auth-item { gap: 10px; }

.auth-email {
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #7b8fa1;
}

.btn-signout {
  min-height: 30px;
  padding: 5px 11px;
  border: 1px solid #24313f;
  border-radius: 7px;
  background: #16202b;
  color: #cfdae5;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.btn-signout:hover { background: #1c2836; color: #ffffff; }

/* On a narrow header the identity is a nicety and the button is the control,
   so the address goes rather than the way out. */
@media (max-width: 560px) {
  .auth-email { display: none; }
}

/* ------------------------------------------------------------- boot failure */

.tp-boot-error {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 9100;
  padding: 14px 18px;
  background: #1c1012;
  border-top: 1px solid #7f1d1d;
  color: #fca5a5;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 13px;
  text-align: center;
}
