/* Incognito chats. Loaded after mayfair-skin.css. Neutral only: a slightly different page tint, dashed hairlines, a ghost mark.
   No amber, no big colours. Same glass recipe as the rest of the app (--glass-* tokens). */

.sb-ghost[hidden], .tb-ghost[hidden] { display: none !important; }

/* ---------- sidebar: ghost button beside New chat ---------- */
.sb-newrow { display: flex; align-items: center; gap: 6px; margin: 4px 0 8px; }
.sb-newrow .sb-new { flex: 1 1 auto; min-width: 0; margin: 0; }
.sidebar.has-ghost .sb-new kbd { display: none; }
.sb-ghost {
  flex: none; width: 36px; height: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; cursor: pointer;
  background: transparent; border: 1px dashed var(--border-strong); color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sb-ghost:hover { background: var(--side-hover); color: var(--text); }
.sb-ghost.on { background: var(--side-active); color: var(--text); border-style: solid; }
.sb-ghost svg { display: block; }

/* ---------- top bar ---------- */
.tb-ghost {
  display: none; flex: none; width: 40px; height: 40px; min-width: 40px; padding: 0; border-radius: 50%; place-items: center;
  background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text); box-shadow: var(--glass-hl), var(--glass-shadow);
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.tb-ghost:hover { background: var(--glass-bg-strong); }
.app.sidebar-collapsed .tb-ghost { display: inline-grid; }

.inc-chip {
  display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; height: 36px; padding: 0 14px 0 10px; border-radius: 999px;
  background: var(--glass-bg); border: 1px dashed var(--border-strong); color: var(--text); font-size: 13.5px; font-weight: 500; letter-spacing: -0.01em;
  -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
}
.inc-chip-ico { display: grid; place-items: center; color: var(--muted); flex: none; }
.inc-chip-label { flex: none; }
.inc-chip-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-weight: 400; }
.inc-chip-title::before { content: "\00b7"; margin: 0 7px 0 1px; color: var(--border-strong); }
.tb-chip-host { min-width: 0; display: flex; }
.chat-view > .topbar .tb-chip-host { margin: 0 auto; max-width: calc(100% - 190px); }
.tb-leave { font-weight: 500; }

/* ---------- the incognito surface: a quiet, slightly deeper neutral ---------- */
:root[data-theme="light"] .is-incognito { --bg: #efefec; --bubble: #e6e6e2; --glass-bg: rgba(255, 255, 255, 0.5); --glass-bg-strong: rgba(255, 255, 255, 0.72); --border-strong: #c9c9c3; }
:root[data-theme="dark"] .is-incognito { --bg: #0a0a0a; --bubble: #1a1a1a; --border-strong: #454545; }
.view.is-incognito { background: var(--bg); }

/* composer: faint dashed hairline instead of the solid one */
.composer-incognito .cmp-box { border-style: dashed; border-color: var(--border-strong); }
.composer-incognito .cmp-box:focus-within { border-style: dashed; border-color: var(--muted); }
.composer-incognito .cmp-note { display: block; }

/* ---------- empty state ---------- */
.inc-empty { display: grid; justify-items: center; gap: 8px; text-align: center; max-width: 470px; }
.inc-empty-ico {
  width: 64px; height: 64px; display: grid; place-items: center; border-radius: 50%; margin-bottom: 6px;
  border: 1px dashed var(--border-strong); color: var(--muted); background: var(--glass-bg);
}
.inc-empty-title { margin: 0; font-size: clamp(26px, 5.6vw, 34px); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
.inc-empty-text { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.6; text-wrap: pretty; }
.inc-empty-sub { margin: 0; color: var(--muted); font-size: 12.5px; opacity: 0.85; }
.inc-center { gap: 30px; }

/* ---------- phones ---------- */
@media (max-width: 800px) {
  .tb-ghost { display: inline-grid; }
  .sb-newrow { position: absolute; right: 16px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 6; margin: 0; gap: 8px; flex-direction: row-reverse; }
  .sb-newrow .sb-new { position: static; flex: none; }
  .sb-ghost {
    width: 50px; height: 50px; background: var(--glass-bg-strong); border: 1px solid var(--glass-border); color: var(--text);
    box-shadow: var(--glass-hl), var(--glass-shadow); -webkit-backdrop-filter: var(--glass-filter); backdrop-filter: var(--glass-filter);
  }
  .sb-ghost svg { width: 22px; height: 22px; }
  .sb-ghost:hover { background: var(--glass-bg-strong); }
  .sb-ghost.on { background: var(--side-active); }
  .chat-view > .topbar .tb-chip-host { max-width: calc(100% - 150px); }
  .inc-chip { height: 36px; }
  .inc-center { gap: 24px; }
  .inc-empty-text { font-size: 14.5px; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .tb-ghost, .inc-chip, .sb-ghost { -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) { .sb-ghost { transition: none; } }

/* artifacts of an incognito chat can't be shared */
.app.inc-chat .af-head-actions button[aria-label="Share"] { display: none; }
