Spaces:
Running on Zero

gpwm-simulation / web /viewer.css
robertren1's picture
Drop anything: the Gradio app
c4ac8d1 verified
Raw History Blame Contribute Delete
8.35 kB
.da {
--da-page: #f4f5f2; --da-ground: #eceee9; --da-ink: #1d2124; --da-muted: #5d6670; --da-faint: #8b949c;
--da-card: #ffffff; --da-chip: #f3f4f1; --da-edge: rgba(29, 33, 36, 0.1); --da-edge-strong: rgba(29, 33, 36, 0.2);
--da-accent: #2f6db3; --da-pick: #d9662f;
display: flex; flex-direction: column; gap: 14px; color: var(--da-ink);
font: 14px/1.45 "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
-webkit-font-smoothing: antialiased;
}
/* a direct visit to the .hf.space address: Hugging Face's own badge sits over the top right corner */
.da.da-badge { padding-top: 46px; }
.da * { box-sizing: border-box; }
.da [hidden] { display: none !important; }
/* ---- header ---- */
.da-top { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; padding: 0 2px; }
.da-title { margin: 0; font-size: 25px; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; color: var(--da-ink); }
.da-sub { margin: 5px 0 0; color: var(--da-muted); font-size: 14px; max-width: 62ch; text-wrap: balance; }
.da-how { display: grid; gap: 5px; justify-items: end; }
.da-steps { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; font-weight: 500; }
.da-steps li { display: flex; align-items: center; gap: 7px; }
.da-num { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--da-ink);
color: #fff; font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.da-alt { margin: 0; color: var(--da-muted); font-size: 13px; }
/* ---- the 3D view ---- */
.da-main { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; height: min(76vh, 820px); min-height: 540px; }
.da-stage { position: relative; min-width: 0; border-radius: 16px; overflow: hidden; background: var(--da-ground); border: 1px solid var(--da-edge); }
.da-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.da-pill { position: absolute; display: flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, 0.9);
border: 1px solid var(--da-edge); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; line-height: 1.3; }
.da-status { display: block; top: 12px; left: 12px; max-width: calc(100% - 24px); color: var(--da-muted); white-space: nowrap;
overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.da-status b { color: var(--da-ink); font-weight: 600; }
.da-busy { top: 12px; right: 12px; font-weight: 500; color: var(--da-ink); }
.da-keys { top: 12px; right: 12px; color: var(--da-muted); background: rgba(255, 255, 255, 0.6); border-color: transparent; pointer-events: none; }
.da-busy:not([hidden]) ~ .da-keys, .da-status:not([hidden]) ~ .da-keys { display: none; }
.da-spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid rgba(47, 109, 179, 0.25); border-top-color: var(--da-accent);
animation: da-spin 0.8s linear infinite; }
@keyframes da-spin { to { transform: rotate(360deg); } }
.da-hint { position: absolute; left: 16px; right: 16px; bottom: 16px; width: fit-content; margin: 0 auto; pointer-events: none;
font-size: 14px; font-weight: 500; color: var(--da-ink); background: rgba(255, 255, 255, 0.95); border: 1px solid var(--da-edge);
border-radius: 999px; padding: 9px 18px; text-align: center; text-wrap: balance;
box-shadow: 0 1px 2px rgba(29, 33, 36, 0.04), 0 6px 18px rgba(29, 33, 36, 0.07); }
/* ---- the panel ---- */
.da-panel { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.da-card { background: var(--da-card); border: 1px solid var(--da-edge); border-radius: 16px; padding: 14px; }
.da-card h2 { margin: 0; font-size: 12px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--da-muted); }
.da-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.da-runrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.da-btn { border: 1px solid var(--da-edge-strong); background: #fff; color: var(--da-ink); border-radius: 999px; padding: 7px 13px;
font: 500 13px/1.1 inherit; font-family: inherit; cursor: pointer; transition: background-color 0.12s, border-color 0.12s; }
.da-btn:hover:not(:disabled) { background: var(--da-chip); }
.da-btn.da-primary { display: inline-flex; justify-content: center; align-items: center; gap: 9px; background: var(--da-ink);
color: #fff; border-color: var(--da-ink); padding: 12px 18px; font-size: 15px; font-weight: 600; }
.da-btn.da-primary:hover:not(:disabled) { background: #000; }
.da-replay { padding: 12px 16px; font-size: 14px; }
.da-btn:disabled { opacity: 0.4; cursor: default; }
.da-btn[aria-pressed="true"] { background: var(--da-ink); color: #fff; border-color: var(--da-ink); }
.da-pendrow { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 11px 2px 12px; font-size: 13px;
color: var(--da-muted); }
.da-link { border: 0; background: none; padding: 0; font: inherit; color: var(--da-accent); cursor: pointer; text-decoration: underline;
text-underline-offset: 2px; }
.da-more { border-top: 1px solid var(--da-edge); padding-top: 12px; }
.da-sel { display: grid; gap: 10px; }
.da-sel .da-sel-title { text-transform: none; letter-spacing: 0; color: var(--da-ink); font-size: 15px; }
.da-field { display: grid; grid-template-columns: 66px minmax(0, 1fr); align-items: center; gap: 8px; }
.da-height { grid-template-columns: 66px minmax(0, 1fr) auto; }
.da-height input { width: 100%; accent-color: var(--da-ink); }
.da-label { font-size: 12.5px; color: var(--da-muted); }
.da-htext { font-size: 12.5px; color: var(--da-ink); min-width: 4.5ch; text-align: right; font-variant-numeric: tabular-nums; }
.da-note { color: var(--da-muted); font-size: 12.5px; }
.da-sel-actions:empty { display: none; }
/* ---- the shelf ---- */
.da-shelf { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
.da-shelf-head { display: flex; justify-content: space-between; align-items: baseline; }
.da-count { font-size: 12px; color: var(--da-faint); font-variant-numeric: tabular-nums; }
.da-search { width: 100%; border: 1px solid var(--da-edge-strong); border-radius: 10px; padding: 8px 11px; font: inherit; background: #fff;
color: var(--da-ink); }
.da-filters .da-btn { padding: 5px 10px; font-size: 12.5px; }
.da-n { color: var(--da-faint); font-weight: 400; margin-left: 4px; font-variant-numeric: tabular-nums; }
.da-btn[aria-pressed="true"] .da-n { color: rgba(255, 255, 255, 0.65); }
.da-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
align-content: start; margin: 0 -4px; padding: 2px 4px; }
.da-item { border: 1px solid transparent; border-radius: 12px; background: var(--da-chip); padding: 7px 4px 8px; cursor: pointer;
display: grid; justify-items: center; align-content: start; gap: 4px; font: 12px/1.25 inherit; font-family: inherit; color: var(--da-ink);
text-align: center; transition: background-color 0.12s, border-color 0.12s; }
.da-item img { width: 80%; aspect-ratio: 1; object-fit: contain; }
.da-item:hover { background: #fff; border-color: var(--da-edge-strong); }
.da-item[aria-pressed="true"] { background: #fff; border-color: var(--da-pick); box-shadow: 0 0 0 2px rgba(217, 102, 47, 0.16); }
.da-empty { grid-column: 1 / -1; color: var(--da-muted); font-size: 13px; padding: 12px 4px; }
.da-btn:focus-visible, .da-item:focus-visible, .da-search:focus-visible, .da-link:focus-visible, .da-h:focus-visible {
outline: 2px solid var(--da-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { .da-spin { animation: none; } .da-btn, .da-item { transition: none; } }
@media (max-width: 1100px) { .da-keys { display: none; } }
@media (max-width: 900px) {
.da-main { grid-template-columns: minmax(0, 1fr); height: auto; min-height: 0; }
.da-stage { height: 58vh; min-height: 360px; }
.da-shelf { max-height: 70vh; }
.da-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.da-how { justify-items: start; }
}
@media (max-width: 480px) {
.da-title { font-size: 22px; }
.da-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.da-hint { font-size: 13px; padding: 8px 14px; }
}