/* Shared debug panel styles — loaded by both the brickbreaker standalone
 * page and the main site. The framework (lib/debugPanel.js) injects a
 * single `.debug-panel` into document.body at a time; these rules style
 * that panel regardless of which target's content is inside.
 *
 * Does NOT include any page-specific rules (fullscreen body/#game etc.) —
 * those belong in each page's own stylesheet. */

.debug-panel {
  position: fixed;
  /* Default spawn position — top-right of the viewport. The panel module
   * switches to inline pixel left/top values on first drag. */
  top: 12px;
  right: 12px;
  width: 260px;
  padding: 10px 12px 8px;
  /* Solid-ish bg. backdrop-filter removed: its blur kernel sampling
   * over a `will-change: transform`-promoted compositor layer (e.g.
   * the panorama `::before` with its translate animation) exposed
   * the layer's clip/buffer edges as ghost rectangles behind the
   * panel. Chromium bug. Dropping the filter also saves a per-frame
   * full-panel-rect GPU blur pass. */
  background: rgba(16, 16, 16, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(240, 240, 240, 0.9);
  font: 11px/1.4 ui-monospace, "SF Mono", Menlo, monospace;
  user-select: none;
  z-index: 9999;
}

.debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  color: rgba(240, 240, 240, 0.65);
  /* The whole header is a drag handle (except for the action buttons,
   * which the panel module lets through as regular clicks). */
  cursor: grab;
}
.debug-header.dragging { cursor: grabbing; }
.debug-title { text-transform: uppercase; }
.debug-header-actions { display: flex; gap: 4px; }
.debug-reset,
.debug-copy {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 3px;
  color: rgba(240, 240, 240, 0.7);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 2px 6px;
  cursor: pointer;
  text-transform: lowercase;
}
.debug-reset:hover,
.debug-copy:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.debug-body { display: flex; flex-direction: column; gap: 10px; }

.debug-section { display: flex; flex-direction: column; gap: 4px; }
.debug-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.12em;
  color: rgba(240, 240, 240, 0.55);
  text-transform: uppercase;
  padding: 2px 0 3px;
  margin-bottom: 2px;
  cursor: pointer;
  text-align: left;
}
.debug-section-title:hover { color: #fff; }
.debug-caret {
  display: inline-block;
  width: 8px;
  font-size: 9px;
  transition: transform 120ms ease;
  transform: rotate(0deg);
}
.debug-section:not(.collapsed) .debug-caret { transform: rotate(90deg); }
.debug-section-body { display: flex; flex-direction: column; gap: 4px; }
.debug-section.collapsed .debug-section-body { display: none; }

.debug-row {
  display: grid;
  grid-template-columns: 90px 1fr 44px;
  align-items: center;
  gap: 8px;
}
.debug-label {
  color: rgba(240, 240, 240, 0.6);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.debug-modified {
  color: #ffc857;
  font-size: 9px;
  line-height: 1;
  width: 8px;
  text-align: center;
  visibility: hidden;
}
.debug-row.modified .debug-modified { visibility: visible; }
.debug-row.modified .debug-label { color: rgba(255, 200, 87, 0.8); }
.debug-value {
  text-align: right;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.debug-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  width: 100%;
  cursor: pointer;
}
.debug-range::-webkit-slider-runnable-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.32);
  border-radius: 3px;
}
.debug-range::-moz-range-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.32);
  border-radius: 3px;
}
.debug-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  margin-top: -3.5px;
}
.debug-range::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #fff;
  border-radius: 50%;
  border: none;
}

.debug-hint {
  margin-top: 8px;
  text-align: right;
  color: rgba(240, 240, 240, 0.35);
  font-size: 10px;
}
