/* Access window (access-window-ui.js): the full-screen lock, the check-out reminder, the special-access chip and the owner's board. Uses the colours of styles.css. */
#aw-lock { position: fixed; inset: 0; z-index: 2147482000; display: flex; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto; background: var(--bg, #f6f4ef); color: var(--ink, #1c1c1c); }
body.aw-locked { overflow: hidden; }
.aw-backdrop { position: fixed; inset: 0; z-index: 2147481000; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 24, 22, .66); overflow-y: auto; }
.aw-card { width: min(520px, 100%); margin: auto; background: var(--surface, #fff); color: var(--ink, #1c1c1c); border: 1px solid var(--line, #ddd); border-radius: var(--radius-lg, 16px); padding: 26px 24px 20px; box-shadow: 0 10px 40px rgba(0, 0, 0, .18); position: relative; outline: none; }
.aw-card-small { width: min(480px, 100%); }
.aw-logo { height: 30px; width: auto; display: block; margin-bottom: 14px; }
.aw-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; background: var(--warn-bg, #fff4d6); color: var(--warn-text, #7a5a00); border: 1px solid var(--warn-border, #e6cf8a); }
#aw-lock h1 { font-size: 1.5rem; margin: 12px 0 4px; line-height: 1.2; }
.aw-card h2 { font-size: 1.25rem; margin: 0 0 6px; padding-right: 28px; }
.aw-hello { margin: 0 0 4px; font-weight: 700; }
.aw-msg { margin: 6px 0 12px; line-height: 1.5; }
.aw-time { margin: 10px 0 0; }
.aw-sep { border: 0; border-top: 1px solid var(--line, #ddd); margin: 16px 0 12px; }
.aw-x { position: absolute; top: 10px; right: 12px; appearance: none; border: 0; background: transparent; color: var(--muted, #666); font-size: 18px; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.aw-x:hover { background: var(--surface-2, #f1f1f1); }
.aw-cap { margin: 8px 0 0; }
.aw-stage { position: relative; width: 100%; max-width: 360px; aspect-ratio: 1 / 1; margin: 6px auto 10px; border-radius: 14px; overflow: hidden; background: #0b0b0b; }
.aw-stage video, .aw-stage canvas { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.aw-stage canvas { transform: none; }
.aw-note { margin: 6px 0; font-size: 14px; line-height: 1.45; color: var(--ink, #1c1c1c); }
.aw-note.bad { color: var(--status-invalid, #b3261e); font-weight: 600; }
.aw-note[hidden] { display: none; }
.aw-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.aw-big { padding: 11px 18px; justify-content: center; }
.aw-ask { margin-top: 4px; }
.aw-small { margin: 0 0 8px; font-size: 13.5px; }
.aw-form { margin-top: 10px; }
.aw-form label { display: block; font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.aw-form textarea { width: 100%; box-sizing: border-box; padding: 9px 11px; border: 1px solid var(--field-line, #ccc); border-radius: 10px; background: var(--surface, #fff); color: var(--ink, #1c1c1c); font: inherit; resize: vertical; }
.aw-req { padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; margin-bottom: 8px; }
.aw-req.waiting { background: var(--surface-2, #f3f1ec); border: 1px solid var(--line, #ddd); }
.aw-req.declined { background: var(--decl-bg, #fdecea); border: 1px solid var(--decl-line, #f3b8b3); color: var(--decl-text, #8a1c14); }
.aw-foot { margin-top: 14px; text-align: right; }
/* The special-access countdown. It used to sit at the bottom centre, which on a phone is exactly where the Leads and Follow-ups
   buttons are: the chip covered them and swallowed the taps. It now rides at the top, clear of both the bottom bar and the
   header's own buttons, and `pointer-events: none` means that even where it does overlap something it can never take a tap. */
#aw-chip {
  position: fixed; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 8px); transform: translateX(-50%);
  z-index: 2147480000; pointer-events: none;
  background: #1d2a22; color: #fff; padding: 6px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; line-height: 1.2; white-space: nowrap;
  max-width: calc(100vw - 24px); overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
}
.aw-reqrow { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--line, #ddd); }
.aw-reqrow:last-child { border-bottom: 0; }
.aw-reqact { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aw-min { width: 70px; padding: 6px 8px; border: 1px solid var(--field-line, #ccc); border-radius: 8px; background: var(--surface, #fff); color: var(--ink, #1c1c1c); font: inherit; }
.util-btn.util-warn { background: var(--warn-bg, #fff4d6); color: var(--warn-text, #7a5a00); border-color: var(--warn-border, #e6cf8a); }
.aw-thumb { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; vertical-align: middle; margin-right: 8px; background: var(--surface-2, #eee); }
.aw-cell { white-space: nowrap; }
@media (max-width: 560px) { #aw-lock { padding: 12px 12px; } .aw-card { padding: 20px 16px 16px; } .aw-stage { max-width: 100%; } .aw-actions .btn { flex: 1 1 100%; } }
