/* The browser shell. Orbit Frame draws its window over macOS vibrancy. A browser has none, so the
   canvas colour goes under the glass. */
html[data-orbit-web] body {
  background: var(--orbit-color-bg-canvas);
}

/* No traffic lights in a browser: the rail starts at the top. */
html[data-orbit-web] .frame-rail-drag {
  display: none;
}

/* The app views: one iframe for each open app, over the area right of the rail (src/views.ts). */
.web-views {
  position: fixed;
  inset: 0 0 0 76px;
  z-index: 10;
}
.web-views[hidden],
.web-views > iframe[hidden] {
  display: none;
}
.web-views > iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  /* Orbit Frame adds Canvas as the page's background: a page that sets none is opaque. */
  background: Canvas;
  color-scheme: light dark;
}

/* The consent dialog of a connect. Cancel is the default (rule 99). */
.web-consent {
  max-width: 420px;
  padding: 20px;
  border: 1px solid var(--orbit-color-border-default, #8884);
  border-radius: 14px;
  background: var(--orbit-color-bg-raised);
  color: var(--orbit-color-text-primary, CanvasText);
  font: inherit;
}
.web-consent::backdrop {
  background: #0006;
}
.web-consent > div {
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
  margin-top: 16px;
}
.web-consent h2 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  /* A dev or agent prompt has its mark on the first line. */
  white-space: pre-line;
}
.web-consent-detail {
  margin: 0;
  white-space: pre-line;
}
.web-consent a.orbit-button {
  text-decoration: none;
}

/* While a press that began in the shell lasts (a drag from the rail, the divider), the frames take no
   pointer, so each move reaches the shell (src/window/index.ts). */
.web-views[data-shell-press] > iframe {
  pointer-events: none;
}

/* The divider between the halves: an element of the shell above the frames, as Orbit Frame's divider
   view is (runtime/static/divider.css). */
.web-divider {
  position: fixed;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: col-resize;
  touch-action: none;
  user-select: none;
  outline: none;
}
.web-divider[hidden] {
  display: none;
}
.web-divider-handle {
  width: 4px;
  height: 40px;
  border-radius: 2px;
  background: var(--orbit-color-text-tertiary, #8e8c93);
}
.web-divider:hover .web-divider-handle,
.web-divider:focus-visible .web-divider-handle {
  background: var(--orbit-color-text-secondary, #67666d);
}
.web-divider:focus-visible .web-divider-handle {
  outline: 2px solid var(--orbit-color-border-focus, #6766dd);
  outline-offset: 2px;
}

/* The app popover and the update dialog (runtime/shell/popover-view.tsx): a layer over the whole page,
   the rail and every frame too. No frame can draw over it, and its backdrop takes each press outside
   the menu, also over a frame (D2). It takes no click while it is hidden. */
.web-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.web-overlay[hidden] {
  display: none;
}
/* The backdrop must paint. Chromium sends a press over a cross-origin frame to that frame when the
   shell's element over it paints nothing, and `inert` on the frames' layer does not stop it (checked
   2026-11-15). A colour this faint is not visible. */
.web-overlay .pop-backdrop {
  background: rgb(0 0 0 / 0.004);
}

/* The agent mark over an agent view (rule 63, previews/index.ts). It is the shell's own element, above
   the frame, so the page cannot cover it. Orbit Frame's colour: amber with diagonal stripes. */
.web-agent-banner {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--web-views-left, 76px);
  height: 34px;
  z-index: 11;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1a1000;
  background: repeating-linear-gradient(135deg, #f08a00 0 14px, #f5a133 14px 28px);
}
.web-agent-banner[hidden],
.web-agent-banner [hidden] {
  display: none;
}
.web-agent-banner-text {
  flex: 1;
}
:root[data-orbit-agent-view] .web-views {
  top: 34px;
}
/* The admin dialogs of Settings (src/admin/dialogs.ts): the box of rule 29, the secret field of
   rule 83 and the webhook window of rule 88. */
.web-admin-dialog {
  max-width: 520px;
}
.web-admin-dialog p,
.web-admin-dialog ol,
.web-admin-dialog ul {
  margin: 8px 0 0;
}
.web-admin-dialog ol,
.web-admin-dialog ul {
  padding-left: 20px;
}
.web-admin-check {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 12px;
}
.web-admin-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 12px;
}
.web-admin-secret {
  font: inherit;
  padding: 6px 8px;
  border: 1px solid var(--orbit-color-border-default, #8886);
  border-radius: 8px;
  background: transparent;
  color: inherit;
}
.web-admin-mono {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.web-admin-url {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}
.web-admin-note {
  font-size: 12px;
  opacity: 0.75;
}
.web-admin-error {
  font-size: 12px;
  color: var(--orbit-color-text-danger, #d33);
}
.web-admin-error:empty {
  display: none;
}
.web-admin-warning {
  color: var(--orbit-color-text-warning, #c80);
}
/* The approval dialog and Review all (rule 35, src/approvals/). The facts scroll, the buttons stay. */
.web-review {
  width: min(600px, calc(100vw - 32px));
  max-width: none;
}
.web-review-facts {
  max-height: min(55vh, 460px);
  overflow-y: auto;
  overflow-wrap: anywhere;
}
.web-review-facts p {
  margin: 0 0 10px;
  white-space: pre-line;
}
.web-review-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  max-height: min(50vh, 420px);
  overflow-y: auto;
}
.web-review-row {
  padding: 10px 0;
  border-top: 1px solid var(--orbit-color-border-default, #8884);
}
.web-review-row label {
  display: flex;
  gap: 8px;
  align-items: baseline;
  font-weight: 500;
}
.web-review-row details {
  margin: 4px 0 0 24px;
}
.web-review-row summary {
  cursor: pointer;
  color: var(--orbit-color-text-secondary, GrayText);
}
.web-review-row .web-review-facts {
  max-height: none;
  margin-top: 6px;
}
.web-review-error,
.web-step-up-error {
  margin: 4px 0 0 24px;
  color: var(--orbit-color-text-danger, #c0362c);
}
.web-review-attention {
  margin: 4px 0 0 24px;
  color: var(--orbit-color-text-warning, #b26b00);
}
.web-step-up-error {
  margin: 8px 0 0;
}
.web-step-up form {
  margin-top: 12px;
}
.web-step-up-code {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font: inherit;
  font-size: 18px;
  letter-spacing: 0.2em;
  border: 1px solid var(--orbit-color-border-default, #8884);
  border-radius: 8px;
  background: var(--orbit-color-bg-canvas, Canvas);
  color: inherit;
}
