/* PANEL-60 Phase 11, Workstream BR — items 261-269.
   Every rule is scoped under .p60br-* classes (or the
   p60br data attributes): nothing here touches the mobile
   chrome metrics (WS-BD's chrome budget), the shells, or
   style.css. Sizes are relative units (rem / %) so the
   layout survives 200% browser zoom (item 267); there is
   no fixed pixel height anywhere in this file — rows grow
   with their content instead of clipping.
   Design tokens: item 245's var(--p60-*) are referenced
   WITH literal fallbacks so this file works before BP
   merges. */

/* ---- 261: visible focus, everywhere in BR surfaces ---- */
.p60br-scope a:focus-visible,
.p60br-scope button:focus-visible,
.p60br-scope input:focus-visible,
.p60br-scope select:focus-visible,
.p60br-scope textarea:focus-visible,
.p60br-scope summary:focus-visible,
.p60br-scope [tabindex]:focus-visible,
.p60br-scope [draggable="true"]:focus-visible {
  outline: 0.1875rem solid var(--p60-focus, var(--pp-accent, #e8b13c));
  outline-offset: 0.125rem;
}
.p60br-scope :focus:not(:focus-visible) {
  outline: none;
}

/* ---- 262: reduced motion (in-app class + device query) ---- */
.p60br-scope[data-p60br-motion="reduce"] *,
html.dp-reduce-motion .p60br-scope * {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
}
@media (prefers-reduced-motion: reduce) {
  .p60br-scope *, .p60br-scope *::before, .p60br-scope *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
.p60br-scope {
  scroll-behavior: smooth;
  max-width: 72rem;
}

/* ---- 263: high contrast (the gallery theme's page face) ---- */
.p60br-hc {
  background: #000000;
  color: #ffffff;
  border: 0.125rem solid #ffffff;
  padding: 1rem;
}
.p60br-hc a { color: #00ffff; }
.p60br-hc .p60br-hc-accent { color: #ffff00; }

/* ---- 264: relative times ---- */
.p60br-rel {
  text-decoration: underline dotted;
  text-underline-offset: 0.1875rem;
  cursor: help;
}

/* ---- 265: error states ---- */
.p60br-error {
  border: 0.125rem solid var(--p60-danger, #e2543e);
  border-radius: var(--p60-radius, 0.5rem);
  padding: 1rem;
  margin-bottom: 1rem;
}
.p60br-error .p60br-error-next { font-weight: 600; }

/* ---- 266: teaching tooltips ---- */
.p60br-tip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: flex-start;
  border: 0.0625rem dashed var(--pp-hairline, #3a3220);
  border-radius: var(--p60-radius, 0.5rem);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}
.p60br-tip p { flex: 1 1 16rem; margin: 0; }

/* ---- 267: zoom-safe layout primitives ---- */
.p60br-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.p60br-grid > * { flex: 1 1 18rem; min-width: 0; }
.p60br-scope img { max-width: 100%; }

/* ---- 268: drag handles / affordances ---- */
.p60br-drag-handle,
.p60bo-drag-handle,
.drag-handle,
[data-drag-handle] {
  cursor: grab;
  touch-action: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  border-radius: 0.375rem;
  color: var(--pp-muted, #a89f8a);
  user-select: none;
}
.p60br-drag-handle::before,
.p60bo-drag-handle::before,
.drag-handle::before,
[data-drag-handle]::before {
  content: "\283F"; /* braille grip dots */
  font-size: 1rem;
  letter-spacing: 0.125rem;
}
.p60br-drag-handle:active,
.p60bo-drag-handle:active,
.drag-handle:active,
[data-drag-handle]:active { cursor: grabbing; }
[draggable="true"] { cursor: grab; }
[draggable="true"]:active { cursor: grabbing; }
.p60br-drag-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  border: 0.0625rem solid var(--pp-hairline, #3a3220);
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

/* ---- 269: the one confirm dialog ---- */
.p60br-confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 300;
}
.p60br-confirm {
  background: var(--pp-panel, #16161c);
  color: var(--pp-text, #f2ead8);
  border-radius: var(--p60-radius, 0.5rem);
  padding: 1.25rem;
  width: 100%;
  max-width: 26rem;
}
.p60br-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}
[hidden] { display: none !important; }
