/* Axonbyok copy: the inner screen fills the window, and the lock's message. */

/* In a browser the app paints a stand-in sky behind the window and insets the
   shell by 28px to look like a desktop window. Drop both: the panel is the page. */
.web-preview body {
  background: none;
}
.web-preview .shell {
  inset: 0;
}

/* No bezel, no rounded outer corners, no right rail, so the stage reaches every
   edge. The vars cascade from body, so the shell, stage and corners follow. */
html {
  background: #faf9f5;
}
html[data-theme="dark"] {
  background: #1f1e1d;
}
body {
  --bezel-top: 0px;
  --bezel-bottom: 0px;
  --rail-right: 0px;
  --radius-outer: 0px;
}

/* Square corners on the stage: a rounded corner here would leave slivers of the
   frame colour showing at the window's corners. The stage's spread shadow stays,
   so the rail keeps the same backdrop it has in the desktop app. */
.stage {
  border-radius: 0;
}

.resize-handle,
.bezel-grip {
  display: none;
}

/* The locked controls: a lock cursor, and the tooltip says why. */
.is-locked {
  cursor: not-allowed !important;
}

/* A little lock inside the pill, so MAX CODE and MyFlyCursor read as locked
   before anything is clicked. Sized to the labels beside it. */
.lock-mini {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  margin-left: 5px;
  color: currentColor;
  opacity: 0.5;
  transition: opacity 160ms ease;
}
.lock-mini svg {
  display: block;
  width: 100%;
  height: 100%;
}
.is-locked:hover .lock-mini {
  opacity: 0.85;
}
/* The fly pill's 7px gap already spaces it from the name. */
.fly-pill .lock-mini {
  margin-left: -2px;
}

/* Images and videos, coming soon (lock.js): the lock sits on the rail
   button's corner, on a small disc so it reads over the icon. With the
   sidebar open, "Soon" sits beside the name instead. A click shakes it. */
.rail-button.is-soon {
  position: relative;
}
.rail-button.is-soon .lock-mini.is-rail {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 2.5px;
  box-sizing: border-box;
  border-radius: 50%;
  background: var(--sheet-solid, #fafafc);
  box-shadow: 0 0 0 1px var(--line, rgba(0, 0, 0, 0.08));
  color: var(--icon, currentColor);
  opacity: 0.9;
}
.lock-mini.is-nudge {
  animation: lock-nudge 420ms ease;
}
@keyframes lock-nudge {
  20% {
    transform: rotate(-14deg);
  }
  45% {
    transform: rotate(12deg);
  }
  70% {
    transform: rotate(-6deg);
  }
}
.soon-tag {
  display: none;
}
[data-sidebar="open"] .rail-main .rail-button.is-soon .soon-tag,
[data-sidebar="closing"] .rail-main .rail-button.is-soon .soon-tag {
  display: inline-flex;
  flex: none;
  align-items: center;
  margin-left: auto;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text, #1d1d1f) 8%, transparent);
  color: var(--text-2, rgba(29, 29, 31, 0.68));
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
[data-sidebar="open"] .rail-main .rail-button.is-soon .lock-mini.is-rail,
[data-sidebar="closing"] .rail-main .rail-button.is-soon .lock-mini.is-rail {
  left: 22px;
  right: auto;
  bottom: 4px;
}
@media (prefers-reduced-motion: reduce) {
  .lock-mini.is-nudge {
    animation: none;
  }
}

/* The message: a dark pill at the top, like the app's own notices. */
.lock-toast {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--sheet-solid, #19191b);
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  color: var(--text, #f4f4f5);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%) translateY(-10px);
  transition: opacity 200ms var(--ease-out, ease), transform 200ms var(--ease-out, ease);
  pointer-events: none;
}
.lock-toast.is-shown {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.lock-toast svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--accent, #34c759);
}

/* Desktop-only settings (lock.js marks them): left out of the website. */
.web-hidden {
  display: none !important;
}

/* Billing's "Used today" counts Work and MAX CODE, which run in the desktop app. */
[data-billing="today"] {
  display: none !important;
}


/* ---- The two pills by the bell (lock.js): "Download desktop" and "About".
   (They lived with the old tour, showcase.css, which the site no longer loads.) */

.tour-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px 0 11px;
  border: 0;
  border-radius: 999px;
  background: var(--sheet);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  box-shadow: 0 0 0 1px var(--line);
  color: var(--text);
  font: 500 13px/1 var(--font-sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.tour-pill:hover {
  background: color-mix(in oklab, var(--sheet), var(--text) 8%);
}
.tour-pill:active {
  transform: scale(0.96);
}
.tour-pill svg {
  flex: none;
  width: 16px;
  height: 16px;
}
.tour-pill.is-primary {
  background: var(--accent);
  color: var(--on-accent, var(--sheet-solid));
  box-shadow: none;
}
.tour-pill.is-primary:hover {
  background: color-mix(in oklab, var(--accent), var(--sheet-solid) 14%);
}
.tour-pill:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
/* Less room (lock.js measures it): words go, then pills. */
.home-tools[data-pills="1"] .tour-pill-show,
.home-tools[data-pills="2"] .tour-pill,
.home-tools[data-pills="3"] .tour-pill-show {
  justify-content: center;
  width: 34px;
  padding: 0;
}
.home-tools[data-pills="1"] .tour-pill-show span,
.home-tools[data-pills="2"] .tour-pill span,
.home-tools[data-pills="3"] .tour-pill-show span {
  display: none;
}
.home-tools[data-pills="3"] .tour-pill-download,
.home-tools[data-pills="4"] .tour-pill {
  display: none;
}

/* Signed out: "Sign in" at the far right (lock.js). It keeps its word while
   the other pills give theirs up, and goes when you're signed in. */
.home-tools .tour-pill.tour-pill-signin {
  display: inline-flex;
  width: auto;
  padding: 0 14px 0 11px;
}
.home-tools .tour-pill.tour-pill-signin span {
  display: inline;
}
/* No room even with the other pills gone (lock.js, level 5): just its icon. */
.home-tools[data-pills="5"] .tour-pill.tour-pill-signin {
  justify-content: center;
  width: 34px;
  padding: 0;
}
.home-tools[data-pills="5"] .tour-pill.tour-pill-signin span {
  display: none;
}
.home-tools .tour-pill.tour-pill-signin[hidden] {
  display: none;
}

/* Signed out: under the message box, using it without an account comes under
   the Terms (lock.js). On a chip, so it reads over a wallpaper too. */
.web-terms {
  width: fit-content;
  max-width: 100%;
  margin: 6px auto 0;
  padding: 2px 10px;
  border-radius: 10px;
  background: var(--sheet);
  font-size: 0.6875rem;
  line-height: 1.4;
  color: var(--text-2);
  text-align: center;
  text-wrap: balance;
}
.web-terms[hidden] {
  display: none;
}
.web-terms .link-button {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* A phone: "About" as its icon, no download pill. The lock's message comes
   down under the top bar (not over the menu and Chat / Work), and wraps
   rather than running off a narrow screen. (A phone on its side too.) */
@media (max-width: 600px), (max-height: 500px) and (hover: none) and (pointer: coarse) {
  .lock-toast {
    top: calc(max(14px, env(safe-area-inset-top)) + 46px);
    right: 12px;
    left: 12px;
    width: fit-content;
    margin-inline: auto;
    padding: 10px 16px;
    font-size: 0.75rem;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    transform: translateY(-10px);
  }

  .lock-toast.is-shown {
    transform: none;
  }

  .tour-pill-download {
    display: none;
  }
  .tour-pill-show {
    justify-content: center;
    width: 34px;
    padding: 0;
  }
  .tour-pill-show span {
    display: none;
  }

  /* Signed out: "Sign in" as its icon, beside the bell (its name stays for
     screen readers), and the Terms line under the box, not above it. */
  .home-tools .tour-pill.tour-pill-signin {
    justify-content: center;
    width: 34px;
    padding: 0;
  }
  .home-tools .tour-pill.tour-pill-signin span {
    display: none;
  }
  .page-home:not(.has-thread) .web-terms {
    order: 7;
  }
}

/* Too narrow for one more button beside Chat / Work. Signed out, the bell
   also makes room for Sign in. */
@media (max-width: 359px) {
  .tour-pill-show {
    display: none;
  }
  .home-tools.is-signed-out .notify-bell {
    display: none;
  }
}

/* "About" wears a smiley, which winks while the pointer is on it. */
.smiley-eye {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 160ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .tour-pill-show:hover .smiley-wink {
    transform: scaleY(0.15);
  }
}

@media (prefers-reduced-motion: reduce) {
  .smiley-eye {
    transition: none;
  }
}
