/* Live mode: the sign-in / register screens (measured from the public login and register pages; the background
   art is original), friend-request badges and sending / failed messages. */

/* ---------- sign in / register ---------- */
.auth-layer { position: fixed; inset: 0; z-index: 200; overflow: auto; background: #170b45; }
.auth-bg { position: fixed; inset: 0; background-size: cover; background-position: center; pointer-events: none; }
.auth-logo { position: absolute; left: 48px; top: 44px; z-index: 1; width: 32px; height: 32px; }
.auth-center { position: relative; z-index: 1; display: grid; place-items: center; min-height: 100%; padding: 24px; }
.auth-card { width: 480px; padding: 32px; border-radius: 8px; background: #242429; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); animation: auth-in 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1); }
@keyframes auth-in { from { opacity: 0; transform: translateY(-12px) scale(1.02); } }
.auth-title { color: var(--text-strong); font-size: 24px; font-weight: 600; line-height: 30px; text-align: center; }
.auth-card:not(.register) .auth-title { margin-bottom: 8px; }
.auth-sub { color: var(--text-default); font-size: 16px; font-weight: 400; line-height: 20px; text-align: center; }
.auth-card .auth-fields { margin-top: 20px; }
.auth-field { margin-bottom: 20px; }
.auth-label { display: block; margin-bottom: 8px; color: var(--text-strong); font-size: 16px; font-weight: 500; line-height: 20px; }
.auth-req { margin-left: 4px; color: #f87e7a; font-weight: 400; }
.auth-err { display: inline; font-style: italic; font-weight: 400; }
.auth-field.error .auth-label { color: #f87e7a; }
.auth-field.error .auth-req { display: none; }
.auth-input { display: block; width: 100%; height: 40px; padding: 1px 12px; border: 1px solid var(--border-normal); border-radius: 8px; background: rgba(0, 0, 0, 0.122); color: var(--text-default); font: 400 16px/20px var(--font); outline: none; }
.auth-input:focus { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: -2px; }
/* the login page's first field is the older 44px input with a blue focus border */
.auth-card:not(.register) .auth-field:first-child .auth-input { height: 44px; padding: 12px 10px; }
.auth-card:not(.register) .auth-field:first-child .auth-input:focus { border-color: #4d96ee; outline: none; }
.auth-field.error .auth-input { border-color: #f87e7a; }
/* register hints show up under a field while it's focused */
.auth-hint { height: 0; margin: 0; overflow: hidden; opacity: 0; color: var(--text-default); font-size: 14px; font-weight: 400; line-height: 18px; transition: height 0.15s ease-out, opacity 0.15s ease-out, margin 0.15s ease-out; }
.auth-field:focus-within + .auth-hint { height: 18px; margin: -12px 0 20px; opacity: 1; }
.auth-btn { position: relative; display: grid; place-items: center; width: 100%; height: 40px; margin-bottom: 8px; padding: 7px 15px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 8px; background: var(--brand); color: #fff; font-size: 16px; font-weight: 500; line-height: 20px; }
.auth-btn:hover { background: #4752c4; }
.auth-btn:disabled { cursor: default; }
.auth-btn.busy { color: transparent; }
.auth-btn.busy::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: #fff; box-shadow: -12px 0 0 #fff, 12px 0 0 #fff; animation: auth-dots 0.9s ease-in-out infinite; }
@keyframes auth-dots { 50% { opacity: 0.35; } }
.auth-switch { margin-top: 4px; color: var(--text-muted); font-size: 14px; line-height: 16px; }
.auth-switch a { margin-left: 4px; color: #798df9; line-height: 18px; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
.register .auth-switch { margin-top: 20px; }
.register .auth-switch a { margin-left: 0; }
.auth-loading { display: flex; flex-direction: column; align-items: center; gap: 16px; color: var(--text-default); font-size: 14px; line-height: 18px; }
.auth-loading img { width: 64px; height: 64px; animation: auth-pulse 1.4s ease-in-out infinite; }
@keyframes auth-pulse { 50% { opacity: 0.45; transform: scale(0.92); } }
.auth-fatal { position: fixed; inset: auto 16px 16px; z-index: 300; padding: 12px 16px; border-radius: 8px; background: #da373c; color: #fff; font-size: 14px; }

/* ---------- friend requests ---------- */
.nav-badge, .tab-badge { flex: none; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--badge-red); color: #fff; font-size: 12px; font-weight: 700; line-height: 16px; letter-spacing: 0.02em; text-align: center; }
.nav-badge { margin-left: auto; }
.tab-badge { display: inline-block; margin-left: 8px; vertical-align: 1px; }
.people-row .action-btn.accept:hover { color: #3ba55c; }

/* ---------- messages that are still sending, or failed ---------- */
.msg.pending .msg-content { color: var(--text-muted); }
.msg.failed .msg-content { color: #f23f43; }

/* ---------- people you blocked or ignored: their messages fold into one row ---------- */
.hidden-run { display: flex; align-items: center; min-height: 32px; margin: 8px 16px 0 72px; color: var(--text-muted); font-size: 14px; line-height: 18px; }
.hidden-run-inner { display: inline-flex; align-items: center; gap: 6px; }
.hidden-run-inner > .ri, .hidden-run-inner > svg { flex: none; }
.hidden-run-dash { margin: 0 2px; }
.hidden-run-toggle { color: var(--text-link); font-size: 14px; }
.hidden-run-toggle:hover { text-decoration: underline; }

/* a 1:1 DM with someone you blocked: the input becomes an Unblock bar */
.composer.blocked .input-box, .composer.blocked .reply-bar { display: none; }
.blocked-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; margin-bottom: 8px; padding: 8px 8px 8px 16px; background: var(--bg-input); border: 1px solid var(--border-muted); border-radius: var(--radius-sm); color: var(--text-muted); font-size: 14px; line-height: 18px; }

/* group DMs: "left the group" notice, and the leave dialog's checkbox */
.msg.system.leave .sys-icon { color: #f23f43; }
.leave-quiet { display: flex; align-items: center; gap: 8px; padding: 4px 0 8px; color: var(--text-default); font-size: 14px; line-height: 18px; cursor: pointer; }
.leave-quiet input { position: absolute; opacity: 0; pointer-events: none; }
.leave-quiet-box { display: grid; place-items: center; flex: none; width: 20px; height: 20px; border: 1px solid var(--border-subtle); border-radius: 4px; color: transparent; }
.leave-quiet input:checked + .leave-quiet-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.leave-quiet input:focus-visible + .leave-quiet-box { outline: 2px solid var(--text-link); outline-offset: 2px; }

/* "Add an account": the login screen over the app gets a way back */
.auth-close { position: absolute; top: 24px; right: 24px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: rgba(0, 0, 0, 0.24); color: #fff; }
.auth-close:hover { background: rgba(0, 0, 0, 0.4); }
.auth-close[hidden] { display: none; }

/* ---------- friend requests and Message Requests ---------- */
.upp-bb button.off, .pf-btn.off { opacity: 0.5; cursor: not-allowed; }
.upp-bb button.off:hover { background: rgba(0, 0, 0, 0.56); }
.pf-btn.off:hover { background: var(--bg-mod-subtle); }
/* Pending (measured): the whole row opens their profile; round 36px buttons on the right */
.people-row.pending { position: relative; }
.people-row.pending .row-hit { position: absolute; inset: 0; border-radius: var(--radius-sm); }
.people-row.pending .people-user, .people-row.pending .people-actions { position: relative; pointer-events: none; }
.people-row.pending .people-actions button { pointer-events: auto; }
.people-row.pending .pn.strong { font-weight: 600; }
.pr-note { color: var(--text-default); font-style: italic; }
.composer .request-bar { color: var(--text-default); }
.composer .request-bar strong { color: var(--text-strong); font-weight: 600; }
.request-btns { display: flex; flex: none; gap: 8px; }
.mbtn.danger-text { color: #f57376; }

/* the system's "only you can see this" message */
.msg.ephemeral { background: rgba(88, 101, 242, 0.06); }
.msg.ephemeral:hover { background: rgba(88, 101, 242, 0.1); }
.app-tag.system-tag { display: inline-flex; align-items: center; gap: 2px; padding: 0 4px 0 2px; vertical-align: 1px; }
.app-tag.system-tag .ic { width: 12px; height: 12px; }
.eph-foot { display: flex; align-items: center; gap: 4px; margin-top: 2px; color: var(--text-muted); font-size: 12px; line-height: 16px; }
.eph-foot .ic { width: 16px; height: 16px; }
.eph-dot { margin: 0 2px; }
.eph-foot button { color: var(--text-link); font-size: 12px; }
.eph-foot button:hover { text-decoration: underline; }
