viewer/styles.css
7.9 KB · 94 lines · css · Download from the repository page
:root { --bg: #eef0f3; --panel: #ffffff; --ink: #1c1f24; --muted: #5d6572; --line: #d7dbe1; --accent: #c0392b; --accent-ink: #ffffff; --focus: #1a4fa0; --hover: #f3f5f8; --sel: #fdecea; --mono: ui-monospace, SFMono-Regular, Menlo, monospace; --sans: -apple-system, "Helvetica Neue", Helvetica, Arial, sans-serif;}* { box-sizing: border-box; }html, body { margin: 0; height: 100%; font: 13px/1.4 var(--sans); color: var(--ink); background: var(--bg); }button, input, select { font: inherit; color: inherit; }button { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; cursor: pointer; }button:hover { background: var(--hover); }button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }button:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible, .tree [role="treeitem"]:focus-visible > .row { outline: 2px solid var(--focus); outline-offset: 1px; } #app { display: grid; grid-template-columns: 300px 1fr 320px; grid-template-rows: 48px 1fr; height: 100%; }header { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--line); }header h1 { font-size: 15px; margin: 0; font-weight: 600; }header .rev { color: var(--muted); font-size: 12px; }header .status { margin-left: auto; font-size: 11px; color: var(--muted); max-width: 46ch; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }header .badge { font-size: 11px; padding: 2px 6px; border-radius: 3px; background: #fff3cd; color: #7a5c00; border: 1px solid #f0d98a; } aside { background: var(--panel); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }aside.right { border-right: 0; border-left: 1px solid var(--line); }aside h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0; padding: 10px 12px 6px; }.search { padding: 0 12px 8px; }.search input { width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; }.tree { overflow: auto; flex: 1; padding: 0 6px 12px; }.tree ul { list-style: none; margin: 0; padding: 0 0 0 14px; }.tree > ul { padding-left: 0; }.tree li[aria-expanded="false"] > ul { display: none; }.tree .row { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 4px; cursor: pointer; }.tree .row:hover { background: var(--hover); }.tree li[aria-selected="true"] > .row { background: var(--sel); box-shadow: inset 3px 0 0 var(--accent); }.tree .tw { width: 14px; text-align: center; color: var(--muted); font-size: 10px; flex: none; }.tree .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.tree .row.hidden-comp .nm { color: var(--muted); text-decoration: line-through; }.tree .row.sku-off .nm { color: #9aa0a6; font-style: italic; }.tree .tag { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 3px; padding: 0 4px; }.tree .match { background: #fff3a8; } main { position: relative; min-width: 0; min-height: 0; }#viewport { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; touch-action: none; }#labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }.label { position: absolute; transform: translate(-50%, -100%); background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 3px; padding: 2px 6px; font-size: 11px; white-space: nowrap; pointer-events: none; box-shadow: 0 1px 2px rgba(0,0,0,.08); }.label.sel { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); font-weight: 600; }.label.occluded { opacity: .55; border-style: dashed; }.label .lead { position: absolute; left: 50%; bottom: -8px; width: 1px; height: 8px; background: var(--muted); }.toolbar { position: absolute; left: 12px; top: 12px; display: flex; flex-wrap: wrap; gap: 6px; max-width: calc(100% - 24px); }.toolbar .grp { display: flex; gap: 2px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 5px; padding: 3px; }.toolbar button { border: 0; background: transparent; padding: 4px 8px; }.toolbar button:hover { background: var(--hover); }.toolbar button[aria-pressed="true"] { background: var(--ink); color: #fff; }.explode { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }.explode label { font-weight: 600; }.explode input[type=range] { flex: 1; min-width: 120px; }.explode .val { font-family: var(--mono); width: 4ch; text-align: right; }.explode .note { color: var(--muted); font-size: 11px; flex-basis: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.legend { position: absolute; right: 12px; bottom: 96px; background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 5px; padding: 6px 10px; font-size: 11px; color: var(--muted); max-width: 300px; }.legend b { color: var(--ink); }.legend kbd { font-family: var(--mono); background: #f1f3f5; border: 1px solid var(--line); border-radius: 3px; padding: 0 3px; }.overlay-msg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(238,240,243,.9); padding: 24px; text-align: center; color: var(--muted); }.overlay-msg.hidden { display: none; }.section-ctl { position: absolute; left: 12px; bottom: 96px; background: rgba(255,255,255,.94); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; display: none; gap: 6px; align-items: center; flex-wrap: wrap; max-width: 320px; }.section-ctl.on { display: flex; }.section-ctl .note { font-size: 11px; color: var(--muted); flex-basis: 100%; } .details { overflow: auto; padding: 0 12px 14px; flex: 1; }.details h3 { margin: 6px 0 2px; font-size: 14px; }.details .id { font-family: var(--mono); color: var(--muted); font-size: 11px; }.details .actions { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }.details table { width: 100%; border-collapse: collapse; margin-top: 6px; }.details th { text-align: left; color: var(--muted); font-weight: 500; width: 34%; vertical-align: top; padding: 3px 6px 3px 0; border-top: 1px solid var(--line); font-size: 12px; }.details td { padding: 3px 0; border-top: 1px solid var(--line); vertical-align: top; }.details .conf { display: inline-block; padding: 0 6px; border-radius: 3px; font-size: 11px; }.conf.verified { background: #e3f4e6; color: #1b5e20; } .conf.derived { background: #e6eefc; color: #1a4fa0; } .conf.approximate { background: #fff3cd; color: #7a5c00; } .conf.unknown { background: #f1f3f5; color: #555; }.details .empty { color: var(--muted); padding: 12px 0; }.details .crumbs { font-size: 11px; color: var(--muted); }.details .crumbs a { color: var(--focus); cursor: pointer; text-decoration: underline; }.opts { padding: 8px 12px; border-top: 1px solid var(--line); display: grid; gap: 6px; font-size: 12px; }.opts label { display: flex; align-items: center; gap: 6px; }.opts select { padding: 2px 4px; border: 1px solid var(--line); border-radius: 3px; background: #fff; } #fallback { padding: 24px; max-width: 900px; margin: 0 auto; }#fallback table { border-collapse: collapse; width: 100%; font-size: 12px; }#fallback td, #fallback th { border: 1px solid var(--line); padding: 4px 6px; text-align: left; vertical-align: top; }.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } @media (max-width: 1000px) { #app { grid-template-columns: 1fr; grid-template-rows: 48px 1fr auto; } aside.left { display: none; } aside.right { max-height: 34vh; border-left: 0; border-top: 1px solid var(--line); } .legend { display: none; }}@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }