/* The offline pass's screen (js/lease.js): it covers the whole app while there is no pass, and the app stays hidden
   behind it. The Match Coder's follows its light or dark theme; PSstudio's is always dark. */
html.lease-wait body { visibility: hidden; }
/* the screen, and the sign-in it opens over itself */
html.lease-locked body > :not(dialog[open]) { visibility: hidden; }

dialog.lease {
  --lease-page: #f2f2f4;
  --lease-card: #ffffff;
  --lease-ink: #0b0b0c;
  --lease-ink-2: #3a3a3e;
  --lease-ink-3: #6e6e73;
  --lease-line: #d9d9de;
  --lease-safe: #3d7a0a;
  --lease-lime: #b8ee3c;
  --lease-on-lime: #0b0b0c;
  visibility: visible;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  box-sizing: border-box;
  background: var(--lease-page);
  color: var(--lease-ink);
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow: auto;
}
dialog.lease[open] { display: grid; place-items: center; }
dialog.lease::backdrop { background: var(--lease-page); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) dialog.lease {
    --lease-page: #000000; --lease-card: #141416; --lease-ink: #ffffff; --lease-ink-2: #e5e5ea; --lease-ink-3: #8e8e93;
    --lease-line: #3a3a3f; --lease-safe: #b8ee3c;
  }
}
:root[data-theme="dark"] dialog.lease,
dialog.lease[data-app="studio"] {
  --lease-page: #000000; --lease-card: #141416; --lease-ink: #ffffff; --lease-ink-2: #e5e5ea; --lease-ink-3: #8e8e93;
  --lease-line: #3a3a3f; --lease-safe: #b8ee3c;
}
dialog.lease[data-app="studio"] { --lease-page: #0b0b0c; --lease-card: #141416; color-scheme: dark; }

.lease-card {
  width: min(100%, 520px);
  box-sizing: border-box;
  padding: 40px 40px 32px;
  border-radius: 14px;
  background: var(--lease-card);
  border: 1px solid var(--lease-line);
  text-align: center;
}
.lease-icon { display: block; width: 64px; height: 64px; margin: 0 auto 20px; }
.lease-title { margin: 0 0 12px; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; text-wrap: balance; }
.lease-text { margin: 0 0 18px; font-size: 17px; line-height: 1.45; color: var(--lease-ink-2); text-wrap: pretty; }
.lease-key { white-space: nowrap; }
.lease-safe { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 15px; font-weight: 600; color: var(--lease-ink); }
.lease-safe svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--lease-safe); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.lease-why { margin: 0 0 24px; min-height: 1.4em; font-size: 14px; line-height: 1.4; color: var(--lease-ink-3); font-variant-numeric: tabular-nums; }
.lease-why:empty { min-height: 0; margin-bottom: 14px; }
.lease-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lease-btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--lease-line);
  background: transparent;
  color: var(--lease-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.lease-btn.primary { background: var(--lease-lime); border-color: var(--lease-lime); color: var(--lease-on-lime); }
.lease-btn:hover:not(:disabled) { border-color: var(--lease-ink-3); }
.lease-btn.primary:hover:not(:disabled) { filter: brightness(0.96); border-color: var(--lease-lime); }
.lease-btn:focus-visible { outline: 2px solid var(--lease-ink); outline-offset: 2px; }
.lease-btn:disabled { opacity: 0.55; cursor: default; }
.lease-btn[hidden] { display: none; }
.lease-status { margin: 16px 0 0; min-height: 1.3em; font-size: 14px; color: var(--lease-ink-2); }
@media (max-width: 480px) {
  .lease-card { padding: 28px 20px 24px; }
  .lease-title { font-size: 24px; }
  .lease-btn { flex: 1 1 100%; }
}

/* The laptop's name, asked once when it first takes a seat (js/lease.js): "Name this laptop" in the app's top bar,
   next to the avatar, with × to keep the browser's name. In the bar, so it covers nothing of the app. */
.lease-name {
  display: inline-flex;
  align-items: stretch;
  flex: none;
  height: 32px;
  margin-right: 8px;
  border-radius: 999px;
  background: #b8ee3c;
  color: #0b0b0c;
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  vertical-align: middle;
}
.lease-name button {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.lease-name-open { padding: 0 8px 0 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap; border-radius: 999px 0 0 999px; }
.lease-name-skip { padding: 0 11px 0 8px; font-size: 16px; line-height: 1; border-left: 1px solid rgba(11, 11, 12, 0.18) !important; border-radius: 0 999px 999px 0; }
.lease-name button:hover { background: rgba(11, 11, 12, 0.08); }
.lease-name button:focus-visible { outline: 2px solid #0b0b0c; outline-offset: -3px; }
.lease-name[data-app="studio"] { height: 26px; margin-right: 6px; }
.lease-name[data-app="studio"] .lease-name-open { font-size: 11.5px; }
@media (max-width: 560px) {
  .lease-name-open { font-size: 11.5px; padding-left: 10px; }
}

/* This laptop, in the avatar's dialog of the Match Coder and PSstudio (js/auth.js): the seat, the laptop's name and
   Work offline on this laptop */
.auth-laptop { display: grid; gap: 8px; margin: 6px 0 0; padding: 14px 0 0; border-top: 1px solid var(--line, #e5e5ea); }
.auth-laptop h3 { margin: 0; font-size: 14px; line-height: 1.25; font-weight: 700; color: var(--ink, inherit); }
#auth-dialog .auth-laptop p { margin: 0; font-size: 13px; line-height: 1.4; }
.auth-laptop-key { white-space: nowrap; font-variant-numeric: tabular-nums; }
.auth-laptop-row { display: flex; align-items: center; gap: 8px; }
.auth-laptop-row .searchbox { flex: 1 1 auto; min-width: 0; }
#auth-dialog .auth-laptop .auth-keep { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 14px; font-weight: 600; color: var(--ink, inherit); cursor: pointer; }
.auth-keep input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--lime, #b8ee3c); }
#auth-dialog .auth-laptop .auth-keep-note { color: var(--ink-2, inherit); }
