/* Floating inspector / outliner / graph-editor panels (F1/F2/F3/F5).
   Copied from greb-docs public/css/base/20-bookshelf-inspector.css so the
   standalone build positions panels as floating widgets instead of full-width
   bands. Brutalism-light to match the graph editor panel. */

.bs-float-panel {
  position: fixed;
  top: 200px;       /* lower from the top of the viewport */
  width: 300px;
  min-width: 240px;
  min-height: 180px;
  max-width: 90vw;
  max-height: 90vh;
  background: #f3efe4;
  color: #1a1713;
  border: 2px solid #1a1713;
  border-radius: 10px;
  box-shadow: 6px 6px 0 #1a1713;
  z-index: 9998;
  font: 11px/1.35 ui-monospace, Menlo, monospace;
  display: none;
  overflow: visible;
  /* flex layout: header fixed, body scrolls */
  flex-direction: column;
}

.bs-float-panel__header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: linear-gradient(90deg, #e85d2a 0%, #c8b57a 100%);
  color: #18120c;
  cursor: move;
  user-select: none;
  touch-action: none; /* pointer-drag owns touch gestures (mobile drag) */
  font-weight: bold;
  letter-spacing: 2.5px;
  font-size: 10.5px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.25);
  border-bottom: 2px solid #18120c;
}
.bs-float-panel__close {
  color: #18120c !important;
}
.bs-float-panel__close:hover { color: #fff !important; }
.bs-float-panel__grip    { opacity: 0.75; }
.bs-float-panel__title   { flex: 1; letter-spacing: 0; text-transform: none; font-weight: normal; opacity: 0.9; }
.bs-float-panel__close {
  background: transparent; border: 0; color: #e8e5dc;
  font-size: 16px; line-height: 1; padding: 0 4px; cursor: pointer;
}
.bs-float-panel__close:hover { color: #ff8a3d; }

/* Pink scrollbar for inspector panels */
.bs-float-panel__body {
  scrollbar-width: thin;
  scrollbar-color: #e85d2a transparent;
}
.bs-float-panel__body::-webkit-scrollbar { width: 6px; background: transparent; }
.bs-float-panel__body::-webkit-scrollbar-track { background: transparent; }
.bs-float-panel__body::-webkit-scrollbar-thumb { background: #e85d2a; border-radius: 3px; }
.bs-float-panel__body::-webkit-scrollbar-thumb:hover { background: #ff7a4a; }

.bs-float-panel__body  {
  padding: 10px 12px 14px; overflow-y: auto; flex: 1; min-height: 0;
  border-radius: 0 0 8px 8px;
}
.bs-float-panel__group { margin-bottom: 10px; }
.bs-float-panel__group-header {
  font-weight: bold; font-size: 9.5px; letter-spacing: 1.5px;
  color: #5a4434; margin: 6px 0 4px;
  border-bottom: 1px solid #c9c1a8;
  padding-bottom: 3px;
}

.bs-float-panel__row {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 8px;
  align-items: center;
  margin: 3px 0;
}
.bs-float-panel__label {
  font-weight: bold; color: #3a2a1c; text-align: right;
}
.bs-num-input {
  width: 100%;
  min-width: 0;            /* allow shrinking inside 1fr grid cells */
  box-sizing: border-box;  /* keep padding+border inside the cell (no overlap) */
  background: #fff;
  border: 1.5px solid #1a1713;
  border-radius: 4px;
  padding: 4px 4px;
  font: inherit;
  font-size: 11px;
  color: #1a1713;
  box-shadow: 1px 1px 0 #1a1713 inset;
}
/* Hide spinner arrows to save horizontal space */
.bs-num-input::-webkit-inner-spin-button,
.bs-num-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bs-num-input[type="number"] {
  -moz-appearance: textfield;
}
.bs-num-input:focus {
  outline: 2px solid #ff8a3d;
  outline-offset: 1px;
}

.bs-float-panel__meta {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #b6ad94;
  font-size: 10px;
  color: #4a3a2c;
  line-height: 1.6;
  word-break: break-all;
}

/* ── UV Viewer ───────────────────────────────────────────────── */
.uv-channel-bar {
  display: flex;
  gap: 4px;
  padding: 4px 8px;
  border-bottom: 1px solid #1a1713;
  background: #e8e2d4;
}
.uv-channel-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 6px;
  font: 11px/1 "JetBrains Mono", monospace;
  border: 1px solid #1a1713;
  border-radius: 4px;
  background: #f3efe4;
  color: #1a1713;
  cursor: pointer;
  text-align: center;
}
.uv-channel-btn svg { width: 12px; height: 12px; }
.uv-channel-btn:hover { background: #ddd8c8; }
.uv-channel-btn.active {
  background: #1a1713;
  color: #f3efe4;
}
.uv-channel-btn.disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.uv-viewer-canvas {
  display: block;
  width: 100%;
  cursor: grab;
}
.uv-viewer-canvas:active { cursor: grabbing; }
.uv-texture-info {
  padding: 2px 8px;
  font: 9px/1.4 "JetBrains Mono", monospace;
  color: #5a4434;
  background: #e8e2d4;
  border-bottom: 1px solid #d4cdb8;
  word-break: break-all;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* ── Custom styled select dropdowns ──────────────────────────── */
.bs-num-input[data-custom-select],
select.bs-num-input {
  appearance: none;
  -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%231a1713'/%3E%3C/svg%3E") no-repeat right 6px center;
  background-size: 8px 5px;
  padding-right: 20px;
  cursor: pointer;
  text-overflow: ellipsis;
}
select.bs-num-input:hover {
  background-color: #faf8f2;
  border-color: #e85d2a;
}
select.bs-num-input:focus {
  outline: 2px solid #e85d2a;
  outline-offset: 1px;
}
select.bs-num-input option {
  background: #f3efe4;
  color: #1a1713;
  padding: 4px 8px;
}

.bs-float-panel__meta b { color: #1a1713; letter-spacing: 1px; margin-right: 4px; }
