/* The look editor (src/ui/panel.js). Its own steady colours, so it stays readable over any look. */
.look-panel {
  --p-bg: #14161a;
  --p-raise: #1c1f25;
  --p-line: #2b2f37;
  --p-text: #e6e1d6;
  --p-muted: #9a958a;
  --p-accent: #e2c58f;
  --p-changed: #4fd8ff;
  position: fixed;
  inset: 0 0 0 auto;
  width: var(--panel-width, 360px);
  display: flex;
  flex-direction: column;
  background: var(--p-bg);
  color: var(--p-text);
  border-left: 1px solid var(--p-line);
  font: 12px/1.45 'Courier New', Courier, monospace;
  z-index: 10;
}
@media (max-width: 760px) {
  .look-panel { inset: auto 0 0 0; width: auto; height: 55svh; border-left: 0; border-top: 1px solid var(--p-line); }
}
.look-header { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 12px 12px 8px; }
.look-title { margin: 0; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--p-accent); align-self: center; }
.look-search { grid-column: 1 / -1; }
.look-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px; border-bottom: 1px solid var(--p-line); }
.look-body { flex: 1; overflow-y: auto; padding: 4px 12px 24px; scrollbar-color: var(--p-line) transparent; }

.look-panel input, .look-panel select, .look-panel textarea, .look-panel button { font: inherit; color: inherit; }
.look-search, .look-text, .look-hex, .look-number, .look-select, .look-io {
  background: var(--p-raise); border: 1px solid var(--p-line); border-radius: 3px; padding: 4px 6px;
}
.look-search { width: 100%; }
.look-io { width: 100%; resize: vertical; margin: 6px 0; font-size: 11px; }
.look-panel :focus-visible { outline: 2px solid var(--p-accent); outline-offset: 1px; }

.look-button, .look-tab, .look-chip, .look-object {
  background: transparent; border: 1px solid var(--p-line); border-radius: 3px; padding: 3px 8px; cursor: pointer;
}
.look-button:hover, .look-tab:hover, .look-chip:hover, .look-object:hover { border-color: var(--p-muted); }
.look-small { padding: 1px 6px; font-size: 11px; }
.look-danger { border-color: #8a3b33; color: #f0a59a; }
.look-tab[aria-selected='true'], .look-chip[aria-pressed='true'], .look-object[aria-pressed='true'], .look-button[aria-pressed='true'] {
  background: var(--p-accent); color: #14161a; border-color: var(--p-accent);
}
/* A small cyan dot marks anything changed from the defaults. */
.look-tab.is-changed::after, .look-object.is-changed::after { content: ''; display: inline-block; width: 5px; height: 5px; margin-left: 5px; border-radius: 50%; background: var(--p-changed); vertical-align: middle; }

.look-section { border-bottom: 1px solid var(--p-line); padding: 6px 0 8px; }
.look-section > summary { cursor: pointer; color: var(--p-muted); text-transform: uppercase; letter-spacing: .1em; font-size: 11px; padding: 4px 0; list-style-position: inside; }
.look-group { margin: 12px 0 6px; font-size: 11px; color: var(--p-muted); text-transform: uppercase; letter-spacing: .1em; font-weight: normal; }
.look-chips, .look-objects, .look-tools { display: flex; flex-wrap: wrap; gap: 5px; margin: 6px 0; }
.look-object-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin: 6px 0 4px; color: var(--p-accent); }

.look-row { display: grid; grid-template-columns: minmax(0, 118px) minmax(0, 1fr) 20px; align-items: center; gap: 4px 8px; padding: 3px 0; }
.look-name { color: var(--p-text); overflow-wrap: anywhere; }
.look-context { color: var(--p-muted); }
.look-row.is-changed .look-name { color: var(--p-changed); }
.look-field { display: flex; align-items: center; gap: 6px; min-width: 0; }
.look-slider { flex: 1; min-width: 0; accent-color: var(--p-accent); }
.look-number { width: 58px; text-align: right; font-variant-numeric: tabular-nums; }
.look-unit { flex: none; width: 3.2ch; color: var(--p-muted); font-size: 11px; white-space: nowrap; overflow: hidden; }
.look-select, .look-text { width: 100%; min-width: 0; }
.look-color { width: 30px; height: 22px; padding: 0; border: 1px solid var(--p-line); border-radius: 3px; background: none; }
.look-hex { width: 76px; }
.look-toggle { width: 16px; height: 16px; accent-color: var(--p-accent); }
.look-reset { width: 20px; height: 20px; padding: 0; border: 0; background: none; color: var(--p-muted); cursor: pointer; visibility: hidden; }
.look-row.is-changed .look-reset { visibility: visible; }
.look-reset:hover { color: var(--p-text); }
.look-help { grid-column: 1 / -1; margin: -1px 0 3px; color: var(--p-muted); font-size: 11px; }
.look-note, .look-status { color: var(--p-muted); font-size: 11px; margin: 8px 0; }
.look-status { color: var(--p-accent); }

.look-open {
  position: fixed; top: 12px; right: 12px; z-index: 10;
  font: 12px 'Courier New', Courier, monospace; color: #e6e1d6;
  background: #14161ae6; border: 1px solid #2b2f37; border-radius: 3px; padding: 4px 10px; cursor: pointer;
}

/* Objects tab: uploading pixel art, and an uploaded item's own row. */
.look-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 10px; }
.look-upload .look-select { width: auto; }
.look-upload .look-status { flex-basis: 100%; margin: 0; }
.look-item { display: flex; align-items: center; gap: 8px; margin: 4px 0; }
.look-item .look-text { flex: 1; min-width: 0; }
.look-thumb { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; background: #0b0c0e; border: 1px solid var(--p-line); border-radius: 3px; }
.look-primary { border-color: #4fd8ff; color: #bfefff; }

/* Built-in things taken out of the room (they can be put back). */
.look-object.is-removed { text-decoration: line-through; color: var(--p-muted); border-style: dashed; }
.look-position { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.look-position .look-name { min-width: 0; }

/* a setting that doesn't apply with the current values: still shown, greyed out */
.look-off > :not(.look-off-note) { opacity: 0.4; }
.look-off-note { font-style: italic; }

/* a picture setting's preview, pixel-crisp */
.look-image { width: 64px; height: 40px; image-rendering: pixelated; border: 1px solid rgba(255,255,255,0.15); background: repeating-conic-gradient(#555 0% 25%, #333 0% 50%) 0 0 / 8px 8px; }
.look-nav { padding: 8px 12px 0; }
.look-fold > summary { cursor: pointer; list-style: revert; }
.look-fold > summary::marker { color: var(--p-muted); }
.look-image-note { color: var(--p-muted); font-size: 11px; min-width: 0; overflow-wrap: anywhere; }
.look-row[data-type='image'] .look-field { flex-wrap: wrap; }
.look-head-buttons { display: inline-flex; gap: 4px; align-items: center; }
.look-head-buttons .look-button:disabled { opacity: 0.35; cursor: default; }
