/* Login gate overlay + user bar for the assessment portal.
   The report itself is styled by the template inherited from html.py; these styles only
   cover the auth chrome layered on top. */
/* The `hidden` attribute must win over the display rules below, or a `display:flex` overlay stays
   visible despite `hidden` (e.g. gate.hidden=true, or the workspace picker before it's opened). */
.ca-gate[hidden], .ca-userbar[hidden], .ca-tp-picker[hidden] { display: none !important; }
.ca-gate {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #1b2638, #0c1019);
  font: 15px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif; color: #f2f6fc;
}
.ca-gate-card {
  width: min(420px, 90vw); padding: 34px 30px; text-align: center;
  background: rgba(13, 20, 33, 0.92); border: 1px solid rgba(120, 150, 200, 0.35);
  border-radius: 16px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5);
}
.ca-gate-logo { font-size: 40px; margin-bottom: 6px; }
.ca-gate-card h2 { margin: 4px 0 10px; font-size: 21px; }
.ca-gate-sub { color: #c3cee0; font-size: 13.5px; margin: 0 0 20px; }
/* "What you need" requirements box on the sign-in gate — plain-language, read-access-forward. */
.ca-reqs {
  text-align: left; background: rgba(46, 117, 182, 0.12); border: 1px solid rgba(120, 150, 200, 0.3);
  border-radius: 10px; padding: 12px 14px; margin: 0 0 18px;
  font-size: 12.5px; line-height: 1.5; color: #c8d3e6;
}
.ca-reqs-h { font-weight: 700; margin-bottom: 6px; color: #eaf1fb; }
.ca-reqs ul { margin: 0; padding-left: 18px; }
.ca-reqs li { margin: 4px 0; }
.ca-reqs strong { color: #eaf1fb; }
.ca-btn {
  appearance: none; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  padding: 11px 20px; border-radius: 8px; color: #fff;
  background: linear-gradient(180deg, #2b88d8, #1d6fbf);
}
.ca-btn:hover { filter: brightness(1.08); }
.ca-btn-ghost { background: transparent; border: 1px solid rgba(120, 150, 200, 0.55); color: #cfe0f5; }
.ca-btn-ghost:hover { filter: none; background: rgba(120, 150, 200, 0.14); }
/* Gate buttons stack full-width; the kit link is an <a> styled as a button. */
#ca-anon .ca-btn, #ca-authed .ca-btn { display: block; width: 100%; margin: 8px 0 0; box-sizing: border-box; }
#ca-kit, #ca-kit-authed { text-decoration: none; text-align: center; }
/* Signed-in "or upload" row: Download kit + Upload JSON side by side. */
.ca-row { display: flex; gap: 8px; }
.ca-row .ca-btn { width: auto; flex: 1; }
.ca-gate-or {
  display: flex; align-items: center; gap: 10px; margin: 14px 2px; color: #7e8aa0;
  font-size: 12px; text-transform: uppercase; letter-spacing: .12em;
}
.ca-gate-or::before, .ca-gate-or::after { content: ""; flex: 1; height: 1px; background: rgba(120, 150, 200, 0.28); }
/* Build / environment indicator — plain, SELECTABLE text in the bottom-right corner.
   Deliberately not a pill: its whole job is to be read and copied into a bug report, so it must
   be selectable — the previous rule set pointer-events:none, which made selecting it impossible —
   and must not be uppercased. (text-transform is cosmetic and does not change what you copy, but
   it makes a hex SHA harder to read and to compare by eye.) Monospace for the same reason. */
#ca-build-banner {
  position: fixed; right: 10px; bottom: 8px; z-index: 9600;
  background: none; color: #7e8aa0; padding: 0; border-radius: 0; box-shadow: none;
  font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  text-transform: none; letter-spacing: 0;
  pointer-events: auto; user-select: text; -webkit-user-select: text;
}
.ca-gate-msg { min-height: 18px; margin: 14px 0 4px; font-size: 13px; color: #ffd479; }
.ca-gate-msg.err { color: #ff8a8a; }
.ca-log {
  text-align: left; margin: 12px 0 4px; max-height: 200px; overflow-y: auto;
  background: rgba(0, 0, 0, 0.28); border: 1px solid rgba(120, 150, 200, 0.25); border-radius: 8px;
  padding: 9px 11px; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #cfe0f5; white-space: pre-wrap; word-break: break-word;
}
.ca-log > div { margin: 1px 0; animation: ca-fade 0.25s ease-out; }
@keyframes ca-fade { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ca-log > div { animation: none; } }
.ca-gate-fine { margin-top: 16px; font-size: 11.5px; color: #7e8aa0; }
.ca-userbar {
  /* sit to the LEFT of the report's fixed top-right controls (theme select + "⬇ Download") */
  position: fixed; top: 10px; right: 250px; z-index: 9000;
  display: flex; align-items: center; gap: 8px;
  background: rgba(13, 20, 33, 0.9); color: #e8edf6; border: 1px solid rgba(120, 150, 200, 0.3);
  padding: 6px 10px; border-radius: 10px; font: 12px/1 -apple-system, "Segoe UI", Roboto, sans-serif;
}
.ca-btn-sm {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600;
  border: 1px solid rgba(120, 150, 200, 0.4); background: transparent; color: inherit;
  padding: 4px 8px; border-radius: 6px;
}
.ca-btn-sm:hover { background: rgba(120, 150, 200, 0.18); }
@media (prefers-reduced-motion: reduce) { .ca-btn { transition: none; } }

/* Token-protection opt-in (#46): a compact checkbox row in the signed-in gate section. */
.ca-optin {
  display: block; margin: 6px auto 12px; max-width: 460px; text-align: left;
  font-size: 12.5px; line-height: 1.45; color: #c8d3e6; cursor: pointer;
}
.ca-optin input { margin-right: 7px; vertical-align: middle; }
.ca-optin-note { display: block; margin-top: 4px; padding-left: 24px; font-size: 11.5px; color: #8b97ad; }

/* Token-protection workspace picker (#46): a centered overlay listing candidate Log Analytics
   workspaces. Shown by auth.js once the workspaces are discovered. */
.ca-tp-picker {
  /* Above the sign-in gate (z 10000) — the picker/notice opens DURING the run while the gate is
     still shown, so it must sit on top of it, not behind. */
  position: fixed; inset: 0; z-index: 10001; display: flex; align-items: center; justify-content: center;
  background: rgba(7, 11, 19, 0.72);
}
.ca-tp-card {
  width: min(560px, 92vw); max-height: 84vh; overflow: auto;
  background: #141d2e; color: #e6edf6; border: 1px solid rgba(120, 150, 200, 0.32);
  border-radius: 12px; padding: 18px 20px; box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  font: 13px/1.5 -apple-system, "Segoe UI", Roboto, sans-serif;
}
.ca-tp-card h3 { margin: 0 0 6px; font-size: 16px; }
.ca-tp-sub { margin: 0 0 14px; color: #9fb0c7; font-size: 12.5px; }
.ca-tp-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.ca-tp-item {
  display: flex; flex-direction: column; gap: 3px; text-align: left; cursor: pointer;
  background: #0f1828; color: #dbe6f3; border: 1px solid rgba(120, 150, 200, 0.3);
  border-radius: 8px; padding: 10px 12px; font: inherit;
}
.ca-tp-item:hover { background: #18223a; border-color: rgba(120, 150, 200, 0.55); }
.ca-tp-item.ca-tp-warn { border-color: rgba(180, 140, 40, 0.6); }
.ca-tp-name { font-weight: 600; }
.ca-tp-meta { font-size: 11.5px; color: #9fb0c7; }
.ca-tp-actions { display: flex; gap: 8px; }
/* Prominent "no workspace / no access" notice (amber) — the actionable outcome, NOT a log line. */
.ca-tp-notice {
  text-align: left; background: rgba(180, 140, 40, 0.14); border: 1px solid rgba(180, 140, 40, 0.55);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; color: #e9dcc0;
  font-size: 12.8px; line-height: 1.55;
}
.ca-tp-notice strong { color: #fff0d2; }
.ca-tp-detail { margin-top: 10px; font: 11px/1.45 ui-monospace, Menlo, Consolas, monospace; color: #b9a988; word-break: break-word; }
