/* Guest access, access-request form, guest badge/banner. Uses the tokens from app.css. */
.guest-actions { display: grid; gap: 8px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.guest-panel h2 { font-size: 18px; }
.guest-panel .btn-back { margin-top: 10px; }
.ts-box { margin: 12px 0; min-height: 0; }
.req-consent { align-items: flex-start; margin: 4px 0 8px; }
.req-consent input { margin-top: 3px; }
.guest-badge { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); white-space: nowrap; }
.guest-nag {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; color: var(--text-muted);
  background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; margin-top: 8px;
}
.guest-nag .btn { margin-left: auto; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 16px; }
.nav-badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.req-msg { max-width: 320px; white-space: pre-wrap; }
.guest-actions[hidden], .guest-badge[hidden], .guest-wrap[hidden], .guest-nag[hidden], .nav-badge[hidden], .btn[hidden] { display: none; }
.cfg-grid input[type=number] {
  width: 100%; font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 8px; padding: .5em .7em;
}
.cfg-grid input[type=number]:focus-visible { outline: 2px solid var(--accent); border-color: var(--accent); }

/* guest badge = button with limits popover */
.guest-wrap { position: relative; flex: none; }
button.guest-badge { cursor: pointer; font: inherit; font-size: 12px; min-height: 28px; }
button.guest-badge:hover { filter: brightness(.97); }
.guest-pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 40; width: min(300px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .15); display: grid; gap: 8px; font-size: 14px;
}
.guest-pop[hidden] { display: none; }
.guest-pop p { margin: 0; }
.guest-limits { border-collapse: collapse; width: 100%; }
.guest-limits th { text-align: left; font-weight: 400; color: var(--text-muted); padding: 2px 0; }
.guest-limits td { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; padding: 2px 0; }
@media (max-width: 480px) { .guest-pop { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 6px); width: auto; } }
