Download frontend/src/styles/components/_embed-studio.css from HuggingFaceSwarms/scaling-swarms: direct link, hf CLI and curl.
- Browser
- Download file 38.5 kB
-
https://huggingface.co/spaces/HuggingFaceSwarms/scaling-swarms/resolve/main/frontend/src/styles/components/_embed-studio.css
- Command line
-
hf download hf://spaces/HuggingFaceSwarms/scaling-swarms/frontend/src/styles/components/_embed-studio.css
-
curl -L -o _embed-studio.css https://huggingface.co/spaces/HuggingFaceSwarms/scaling-swarms/resolve/main/frontend/src/styles/components/_embed-studio.css
38.5 kB
/* ============================================================================ */
/* Embed Studio - Full-screen chart editor panel */
/* ============================================================================ */
.embed-studio {
position: fixed;
inset: 0;
z-index: var(--z-modal);
display: flex;
flex-direction: column;
background: var(--page-bg);
color: var(--text-color);
}
/* --- Header --- */
.es-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-header__left {
display: flex;
align-items: center;
gap: 8px;
}
.es-header__icon {
color: var(--primary-color);
}
.es-header__model {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 8px;
border-radius: 999px;
border: 1px solid var(--border-color);
font-size: 11px;
color: var(--muted-color);
white-space: nowrap;
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
}
.es-header__left {
min-width: 0;
}
.es-header__files-toggle {
display: none;
}
.es-header__title {
font-size: 14px;
font-weight: 600;
}
.es-header__src {
font-family: var(--font-mono);
font-size: 12px;
color: var(--muted-color);
background: var(--code-bg);
padding: 2px 6px;
border-radius: 4px;
}
.es-header__actions {
display: flex;
gap: 4px;
}
/* --- Body: split panel --- */
.es-body {
display: flex;
flex: 1;
min-height: 0;
}
/* --- Chat panel (left) --- */
.es-chat {
width: 400px;
min-width: 320px;
max-width: 480px;
display: flex;
flex-direction: column;
border-right: 1px solid var(--border-color);
}
.es-chat__messages {
flex: 1;
overflow-y: auto;
padding: 16px;
display: flex;
flex-direction: column;
gap: 12px;
}
.es-chat__empty {
text-align: center;
color: var(--muted-color);
padding: 40px 20px;
font-size: 13px;
line-height: 1.6;
}
.es-chat__hint {
font-size: 12px;
opacity: 0.7;
font-style: italic;
margin-top: 8px;
}
/* Messages */
.es-message {
max-width: 90%;
font-size: 13px;
line-height: 1.5;
}
.es-message--user {
align-self: flex-end;
}
.es-message--ai {
align-self: flex-start;
}
.es-message__text {
padding: 8px 12px;
border-radius: 12px;
word-break: break-word;
font-size: 0.82rem;
line-height: 1.55;
}
.es-message--user .es-message__text { white-space: pre-wrap; }
/* Markdown inside embed assistant bubbles */
.es-message__text p { margin: 0 0 0.4em; }
.es-message__text p:last-child { margin-bottom: 0; }
.es-message__text ul,
.es-message__text ol { margin: 0.3em 0; padding-left: 1.4em; }
.es-message__text li { margin-bottom: 0.15em; }
.es-message__text code {
font-family: 'SF Mono', 'Fira Code', monospace;
font-size: 0.85em;
background: rgba(0,0,0,0.15);
padding: 1px 4px;
border-radius: 3px;
}
.es-message__text pre {
background: rgba(0,0,0,0.15);
padding: 8px 10px;
border-radius: 6px;
overflow-x: auto;
margin: 0.4em 0;
}
.es-message__text pre code { background: none; padding: 0; }
.es-message__text strong { font-weight: 600; }
.es-message__text a { color: var(--primary-color); text-decoration: underline; }
.es-message__text blockquote {
margin: 0.4em 0;
padding-left: 10px;
border-left: 2px solid var(--border-color);
opacity: 0.7;
}
.es-message--user .es-message__text {
background: var(--primary-color);
color: var(--on-primary);
border-bottom-right-radius: 4px;
}
.es-message--ai .es-message__text {
background: var(--surface-bg);
border: 1px solid var(--border-color);
border-bottom-left-radius: 4px;
}
.es-message__tool {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 8px;
font-size: 11px;
font-family: var(--font-mono);
background: var(--code-bg);
border-radius: 6px;
color: var(--muted-color);
margin-top: 4px;
max-width: 100%;
}
.es-message__tool-name {
font-weight: 600;
white-space: nowrap;
}
.es-message__tool-subtitle {
font-family: var(--font-mono);
font-size: 10.5px;
opacity: 0.75;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 180px;
}
.es-message__tool--running {
color: var(--primary-color);
background: color-mix(in srgb, var(--primary-color) 12%, var(--code-bg));
}
.es-message__tool--done {
color: var(--success-color, var(--muted-color));
}
.es-message__tool-status--running {
color: var(--primary-color);
}
.es-message__tool-status--done {
color: var(--success-color);
}
/* Input area */
.es-chat__input-area {
padding: 12px;
border-top: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-chat__error {
display: flex;
gap: 8px;
align-items: flex-start;
margin-bottom: 10px;
padding: 10px 12px;
border-radius: 8px;
font-size: 12px;
line-height: 1.45;
color: var(--text-color);
background: color-mix(in srgb, var(--danger-color, #d64545) 9%, transparent);
border: 1px solid color-mix(in srgb, var(--danger-color, #d64545) 35%, transparent);
}
.es-chat__error > svg {
flex-shrink: 0;
margin-top: 1px;
color: var(--danger-color, #d64545);
}
.es-chat__error-body {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
}
.es-chat__error-body > span {
color: var(--muted-color);
word-break: break-word;
}
.es-chat__error-actions {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-top: 4px;
}
.es-chat__error-actions a {
text-decoration: none;
}
.es-chat__input-row {
display: flex;
align-items: flex-end;
gap: 8px;
}
.es-chat__textarea {
flex: 1;
resize: none;
border: 1px solid var(--border-color);
border-radius: 8px;
padding: 8px 12px;
font-size: 13px;
font-family: inherit;
line-height: 1.5;
background: var(--page-bg);
color: var(--text-color);
outline: none;
min-height: 36px;
max-height: 160px;
}
.es-chat__textarea:focus {
border-color: var(--primary-color);
}
.es-chat__send-btn {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
border: none;
border-radius: 8px;
background: var(--primary-color);
color: var(--on-primary);
cursor: pointer;
flex-shrink: 0;
transition: opacity 120ms ease;
}
.es-chat__send-btn:hover {
opacity: 0.85;
}
.es-chat__send-btn:disabled {
opacity: 0.4;
cursor: default;
}
/* --- Preview panel (right) --- */
.es-preview {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
}
.es-preview__toolbar {
display: flex;
align-items: center;
gap: 4px;
padding: 6px 12px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-preview__tab {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border: 1px solid transparent;
border-radius: 6px;
background: none;
font-size: 12px;
color: var(--muted-color);
cursor: pointer;
transition: all 120ms ease;
}
.es-preview__tab:hover {
background: var(--border-color);
color: var(--text-color);
}
.es-preview__tab--active {
background: var(--border-color);
color: var(--text-color);
font-weight: 600;
}
/* Iframe container */
.es-preview__frame-container {
flex: 1;
position: relative;
overflow: hidden;
/* The iframe body is set to `background: transparent` by build-doc,
so whatever sits behind the iframe is what actually shows. Pin the
container to --page-bg so the preview tracks the theme instead of
falling through to the browser's default white. */
background: var(--page-bg);
}
/* Stage: the positioned context the double-buffered iframes fill (inset:0).
Default: fills the whole frame container (chart previews). */
.es-preview__stage {
position: relative;
width: 100%;
height: 100%;
}
/* Banner mode: center a 5:2 box matching .hero-banner so the preview is a
true WYSIWYG of how the banner renders in the article header. */
.es-preview__frame-container--banner {
display: flex;
align-items: center;
justify-content: center;
padding: 24px;
}
.es-preview__frame-container--banner .es-preview__stage {
height: auto;
width: 100%;
max-width: 980px;
aspect-ratio: 5 / 2;
border: 1px solid var(--border-color);
border-radius: 8px;
overflow: hidden;
}
.es-preview__frame-container iframe {
/* Some browsers paint a default white canvas on `srcdoc` iframes
before the document's own <style> applies. Forcing the element
itself to transparent lets --page-bg show through, which keeps
dark mode clean while the chart is (re)loading. */
background: transparent;
color-scheme: light dark;
}
.es-hidden {
display: none !important;
}
.es-preview__empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
gap: 12px;
color: var(--muted-color);
font-size: 13px;
}
/* Code view */
.es-preview__code {
flex: 1;
overflow: auto;
padding: 16px;
background: var(--code-bg);
}
.es-preview__pre {
margin: 0;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.6;
white-space: pre-wrap;
word-break: break-all;
color: var(--text-color);
}
/* --- Files sidebar (far left) --- */
.es-files {
width: 240px;
min-width: 220px;
max-width: 260px;
display: flex;
flex-direction: column;
border-right: 1px solid var(--border-color);
background: var(--surface-bg);
overflow-y: auto;
}
.es-files__section {
display: flex;
flex-direction: column;
padding: 10px 12px 14px;
border-bottom: 1px solid var(--border-color);
}
.es-files__section:last-child {
border-bottom: none;
}
.es-files__section-title {
display: flex;
align-items: center;
gap: 6px;
text-transform: uppercase;
font-size: 10.5px;
font-weight: 700;
letter-spacing: 0.06em;
color: var(--muted-color);
margin-bottom: 8px;
}
.es-files__count {
margin-left: auto;
font-size: 10.5px;
font-weight: 600;
color: var(--muted-color);
background: var(--code-bg);
padding: 1px 6px;
border-radius: 10px;
}
.es-files__list {
list-style: none;
margin: 0 0 8px;
padding: 0;
display: flex;
flex-direction: column;
gap: 2px;
}
.es-files__empty {
font-size: 11.5px;
color: var(--muted-color);
padding: 4px 0 6px;
font-style: italic;
}
.es-files__item {
display: flex;
align-items: center;
gap: 6px;
padding: 5px 8px;
border-radius: 6px;
font-size: 12px;
color: var(--text-color);
min-width: 0;
}
.es-files__item--current {
background: color-mix(in srgb, var(--primary-color) 14%, transparent);
color: var(--text-color);
}
.es-files__item--data,
.es-files__item:has(> .es-files__item-main) {
padding: 0;
overflow: hidden;
}
.es-files__item-main {
flex: 1;
display: flex;
align-items: center;
gap: 6px;
background: transparent;
border: none;
padding: 5px 8px;
font-size: 12px;
color: inherit;
cursor: pointer;
text-align: left;
min-width: 0;
border-radius: 6px;
}
.es-files__item-main:hover {
background: var(--code-bg);
}
.es-files__item--current .es-files__item-main:hover {
background: color-mix(in srgb, var(--primary-color) 20%, transparent);
}
.es-files__name {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
min-width: 0;
}
.es-files__size {
font-size: 10.5px;
color: var(--muted-color);
font-variant-numeric: tabular-nums;
}
.es-files__badge {
font-size: 9.5px;
text-transform: uppercase;
letter-spacing: 0.06em;
font-weight: 700;
color: var(--primary-color);
background: var(--page-bg);
padding: 1px 5px;
border-radius: 10px;
}
.es-files__item-remove {
background: transparent;
border: none;
color: var(--muted-color);
cursor: pointer;
padding: 4px 8px;
display: flex;
align-items: center;
opacity: 0;
transition: opacity 120ms ease, color 120ms ease;
}
.es-files__item--data:hover .es-files__item-remove {
opacity: 1;
}
.es-files__item-remove:hover {
color: var(--danger-color, #e44);
}
.es-files__error {
display: flex;
align-items: center;
gap: 6px;
margin-top: 6px;
padding: 6px 8px;
font-size: 11.5px;
color: var(--danger-color, #e44);
background: color-mix(in srgb, var(--danger-color, #e44) 10%, transparent);
border-radius: 6px;
}
/* --- Upload zone --- */
.es-upload-zone {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 14px 10px;
margin-top: 4px;
border: 1.5px dashed var(--border-color);
border-radius: 8px;
color: var(--muted-color);
font-size: 12px;
cursor: pointer;
transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
text-align: center;
flex-direction: column;
}
.es-upload-zone:hover,
.es-upload-zone:focus-visible {
border-color: var(--primary-color);
color: var(--text-color);
background: color-mix(in srgb, var(--primary-color) 6%, transparent);
outline: none;
}
.es-upload-zone--active {
border-color: var(--primary-color);
background: color-mix(in srgb, var(--primary-color) 12%, transparent);
color: var(--text-color);
}
.es-upload-zone--compact {
flex-direction: row;
padding: 8px 10px;
font-size: 11.5px;
}
.es-upload-zone__text {
display: flex;
flex-direction: column;
gap: 2px;
align-items: center;
}
.es-upload-zone__text strong {
color: var(--text-color);
font-size: 12.5px;
font-weight: 600;
}
.es-upload-zone__text span {
font-size: 10.5px;
color: var(--muted-color);
}
/* --- Data file viewer --- */
.es-data-viewer {
position: absolute;
inset: 0;
display: flex;
flex-direction: column;
background: var(--page-bg);
z-index: 3;
}
.es-preview {
position: relative;
}
.es-data-viewer__header {
display: flex;
align-items: center;
gap: 12px;
padding: 8px 12px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-data-viewer__title {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
}
.es-data-viewer__title strong {
font-size: 13px;
font-weight: 600;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.es-data-viewer__meta {
font-size: 11px;
color: var(--muted-color);
font-variant-numeric: tabular-nums;
}
.es-data-viewer__actions {
margin-left: auto;
display: flex;
align-items: center;
gap: 8px;
}
.es-data-viewer__tabs {
display: flex;
gap: 2px;
}
.es-data-viewer__body {
flex: 1;
overflow: auto;
padding: 12px;
min-height: 0;
}
.es-data-viewer__raw {
margin: 0;
padding: 12px 14px;
background: var(--code-bg);
border-radius: 6px;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.6;
color: var(--text-color);
overflow-x: auto;
white-space: pre;
}
.es-data-table-wrap {
border: 1px solid var(--border-color);
border-radius: 6px;
overflow: auto;
}
.es-data-table {
width: 100%;
border-collapse: collapse;
font-family: var(--font-mono);
font-size: 11.5px;
}
.es-data-table th,
.es-data-table td {
padding: 6px 10px;
border-right: 1px solid var(--border-color);
border-bottom: 1px solid var(--border-color);
text-align: left;
vertical-align: top;
max-width: 280px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.es-data-table th:last-child,
.es-data-table td:last-child {
border-right: none;
}
.es-data-table thead th {
position: sticky;
top: 0;
background: var(--surface-bg);
font-weight: 600;
color: var(--text-color);
z-index: 1;
}
.es-data-table tbody tr:nth-child(even) {
background: color-mix(in srgb, var(--border-color) 20%, transparent);
}
.es-data-table__footer {
padding: 8px 12px;
font-size: 11px;
color: var(--muted-color);
border-top: 1px solid var(--border-color);
background: var(--surface-bg);
font-style: italic;
text-align: center;
}
/* --- Suggestion chips --- */
.es-chips {
display: flex;
flex-wrap: wrap;
gap: 6px;
justify-content: center;
margin-top: 14px;
}
.es-chips--followups {
justify-content: flex-start;
margin-top: 0;
}
.es-chip {
border: 1px solid var(--border-color);
background: var(--surface-bg);
color: var(--text-color);
border-radius: 999px;
padding: 5px 11px;
font: inherit;
font-size: 12px;
line-height: 1.35;
text-align: left;
cursor: pointer;
transition: border-color 120ms ease, background 120ms ease;
}
.es-chip:hover,
.es-chip:focus-visible {
border-color: var(--primary-color);
background: color-mix(in srgb, var(--primary-color) 8%, var(--surface-bg));
outline: none;
}
/* --- Versions --- */
.es-message-group {
display: flex;
flex-direction: column;
gap: 4px;
}
.es-message-group:has(> .es-message--user) {
align-items: flex-end;
}
.es-version {
display: inline-flex;
align-items: center;
gap: 6px;
align-self: flex-start;
font-size: 11px;
color: var(--muted-color);
}
.es-version__n {
font-family: var(--font-mono);
font-weight: 700;
color: var(--text-color);
background: var(--code-bg);
padding: 1px 6px;
border-radius: 4px;
}
.es-version__current {
font-style: italic;
}
.es-version__btn {
border: none;
background: none;
padding: 1px 2px;
font: inherit;
color: var(--primary-color);
cursor: pointer;
text-decoration: underline;
text-underline-offset: 2px;
}
.es-version__btn:disabled {
opacity: 0.5;
cursor: default;
}
.es-version__btn--on {
font-weight: 700;
}
.es-viewing {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
padding: 8px 12px;
font-size: 12px;
border-bottom: 1px solid var(--border-color);
background: color-mix(in srgb, var(--primary-color) 10%, var(--surface-bg));
}
/* --- Preview toolbar groups --- */
.es-segmented {
display: inline-flex;
gap: 2px;
padding-right: 6px;
margin-right: 2px;
border-right: 1px solid var(--border-color);
}
.es-preview__toolbar {
flex-wrap: wrap;
row-gap: 6px;
}
.es-preview__toolbar .embed-btn {
display: inline-flex;
align-items: center;
gap: 5px;
}
/* Width presets: the stage is centered and capped at the preset width. */
.es-preview__frame-container:not(.es-preview__frame-container--banner) .es-preview__stage {
margin: 0 auto;
border-inline: 1px dashed color-mix(in srgb, var(--border-color) 70%, transparent);
}
/* The preview paints its own theme background so light/dark can be checked
independently of the editor theme. */
.es-preview__frame-container--light {
background: #fff;
}
.es-preview__frame-container--dark {
background: #0f1115;
}
/* --- Preview error banner --- */
.es-preview__error {
position: absolute;
left: 12px;
right: 12px;
bottom: 12px;
z-index: 5;
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
border-radius: 8px;
font-size: 12px;
color: var(--text-color);
background: var(--surface-bg);
border: 1px solid color-mix(in srgb, var(--danger-color, #d64545) 50%, transparent);
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
}
.es-preview__error > svg {
flex-shrink: 0;
color: var(--danger-color, #d64545);
}
.es-preview__error-text {
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.es-preview__error-text code {
font-family: var(--font-mono);
font-size: 11.5px;
}
.es-preview__error .embed-btn {
display: inline-flex;
align-items: center;
gap: 4px;
flex-shrink: 0;
}
/* --- Code view --- */
.es-preview__code {
padding: 0;
display: flex;
flex-direction: column;
}
.es-code {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
}
.es-code__actions {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
position: sticky;
top: 0;
z-index: 1;
}
.es-code__actions .embed-btn {
display: inline-flex;
align-items: center;
gap: 4px;
}
.es-code__meta {
flex: 1;
font-size: 11px;
color: var(--muted-color);
}
.es-code__body {
flex: 1;
overflow: auto;
padding: 12px 16px;
}
.es-code__shiki pre {
margin: 0;
background: transparent !important;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.6;
white-space: pre-wrap;
overflow-wrap: anywhere;
}
.es-code__shiki span {
color: var(--shiki-light, inherit);
}
html[data-theme="dark"] .es-code__shiki span {
color: var(--shiki-dark, inherit);
}
/* --- Mobile: one pane at a time, files in a drawer --- */
.es-mobile-tabs {
display: none;
}
.es-files-wrap {
display: flex;
}
.es-files-scrim {
display: none;
}
@media (max-width: 900px) {
.es-header__files-toggle {
display: inline-flex;
}
.es-header__src,
.es-header__model {
display: none;
}
.es-mobile-tabs {
display: flex;
flex-shrink: 0;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
}
.es-mobile-tabs__tab {
position: relative;
flex: 1;
padding: 9px 0;
border: none;
border-bottom: 2px solid transparent;
background: none;
font: inherit;
font-size: 13px;
color: var(--muted-color);
cursor: pointer;
}
.es-mobile-tabs__tab--active {
color: var(--text-color);
font-weight: 600;
border-bottom-color: var(--primary-color);
}
.es-mobile-tabs__dot {
position: absolute;
top: 9px;
margin-left: 4px;
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--danger-color, #d64545);
}
.es-body {
position: relative;
}
.es-files-wrap {
position: absolute;
inset: 0 auto 0 0;
z-index: 6;
transform: translateX(-100%);
transition: transform 180ms ease;
box-shadow: 4px 0 24px rgba(0, 0, 0, 0.2);
}
.embed-studio[data-files-open="true"] .es-files-wrap {
transform: none;
}
.embed-studio[data-files-open="true"] .es-files-scrim {
display: block;
position: absolute;
inset: 0;
z-index: 5;
border: none;
background: rgba(0, 0, 0, 0.3);
}
.es-chat {
width: 100%;
max-width: none;
min-width: 0;
border-right: none;
}
.embed-studio[data-pane="chat"] .es-preview,
.embed-studio[data-pane="preview"] .es-chat {
display: none;
}
.es-hide-narrow {
display: none;
}
.es-segmented {
border-right: none;
}
}
@media (prefers-reduced-motion: reduce) {
.es-files-wrap {
transition: none;
}
}
/* --- Draft status, presence, apply --- */
.es-header__status {
font-size: 11px;
color: var(--muted-color);
white-space: nowrap;
}
.es-header__status--draft {
color: var(--text-color);
padding: 1px 8px;
border-radius: 999px;
background: color-mix(in srgb, var(--primary-color) 14%, transparent);
}
.es-header__peers {
display: inline-flex;
align-items: center;
gap: 4px;
font-size: 11px;
color: var(--muted-color);
white-space: nowrap;
}
.es-header__peers i {
display: inline-grid;
place-items: center;
width: 18px;
height: 18px;
border-radius: 50%;
font: 700 9px/1 var(--font-sans, inherit);
font-style: normal;
color: #111;
}
.es-header__actions {
align-items: center;
}
.es-header__apply {
display: inline-flex;
align-items: center;
gap: 5px;
white-space: nowrap;
}
.es-header__apply:disabled {
opacity: 0.5;
cursor: default;
}
.es-notice {
position: absolute;
left: 50%;
top: 52px;
z-index: 8;
transform: translateX(-50%);
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
border-radius: 999px;
font-size: 12px;
color: var(--text-color);
background: var(--surface-bg);
border: 1px solid var(--border-color);
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}
.es-notice > svg {
color: var(--success-color, #2f9e44);
}
/* --- Close dialog --- */
.es-dialog-scrim {
position: absolute;
inset: 0;
z-index: 20;
display: grid;
place-items: center;
background: rgba(0, 0, 0, 0.35);
}
.es-dialog {
width: min(460px, calc(100vw - 32px));
padding: 18px 20px;
border-radius: 12px;
background: var(--page-bg);
border: 1px solid var(--border-color);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}
.es-dialog h2 {
margin: 0 0 6px;
font-size: 15px;
}
.es-dialog p {
margin: 0 0 14px;
font-size: 13px;
line-height: 1.5;
color: var(--muted-color);
}
.es-dialog__actions {
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.es-dialog__danger {
color: var(--danger-color, #d64545);
}
/* --- Chat: authors, attachments, drop target --- */
.es-message__author {
display: block;
margin: 0 4px 2px;
font-size: 10.5px;
color: var(--muted-color);
text-align: right;
}
.es-chat {
position: relative;
}
.es-chat__drop {
position: absolute;
inset: 8px;
z-index: 4;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 8px;
border: 2px dashed var(--primary-color);
border-radius: 12px;
font-size: 13px;
color: var(--text-color);
background: color-mix(in srgb, var(--primary-color) 10%, var(--page-bg));
pointer-events: none;
}
.es-attached {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 6px;
margin-bottom: 8px;
}
.es-attached__chip {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 4px 2px 8px;
border-radius: 999px;
font-size: 11.5px;
background: var(--code-bg);
}
.es-attached__chip button {
display: inline-flex;
border: none;
background: none;
padding: 2px;
color: var(--muted-color);
cursor: pointer;
}
.es-attached__error {
font-size: 11.5px;
color: var(--danger-color, #d64545);
}
.es-count {
margin-left: 2px;
padding: 0 5px;
border-radius: 8px;
font-size: 10px;
background: var(--code-bg);
}
/* --- Before / after compare --- */
.es-preview__stage--compare {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: auto 1fr;
gap: 4px 16px;
height: 100%;
}
.es-preview__frame-container--banner .es-preview__stage--compare {
grid-template-columns: 1fr;
grid-template-rows: auto auto auto auto;
aspect-ratio: auto;
border: none;
overflow: visible;
}
.es-preview__frame-container--banner .es-preview__stage--compare iframe {
aspect-ratio: 5 / 2;
height: auto !important;
border: 1px solid var(--border-color) !important;
border-radius: 8px;
}
.es-preview__frame-container--banner .es-preview__stage--compare .es-compare__label:nth-of-type(2) {
grid-row: 3;
}
.es-preview__frame-container--banner .es-preview__stage--compare iframe:nth-of-type(1) {
grid-row: 2;
}
.es-preview__frame-container--banner .es-preview__stage--compare iframe:nth-of-type(2) {
grid-row: 4;
}
.es-compare__label {
padding-top: 6px;
font-size: 11px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: uppercase;
color: #888;
}
.es-preview__stage--compare iframe {
outline: 1px dashed color-mix(in srgb, #888 40%, transparent);
}
/* --- Code diff --- */
.es-diff__summary {
margin: 0 0 8px;
font-size: 12px;
color: var(--muted-color);
}
.es-diff__add {
color: var(--success-color, #2f9e44);
font-weight: 600;
}
.es-diff__del {
color: var(--danger-color, #d64545);
font-weight: 600;
}
.es-diff__empty {
font-size: 12px;
color: var(--muted-color);
}
.es-diff__body {
margin: 0;
font-family: var(--font-mono);
font-size: 12px;
line-height: 1.55;
}
.es-diff__line {
white-space: pre-wrap;
overflow-wrap: anywhere;
padding: 0 8px;
}
.es-diff__sign {
display: inline-block;
width: 14px;
opacity: 0.7;
}
.es-diff__line--add {
background: color-mix(in srgb, var(--success-color, #2f9e44) 14%, transparent);
}
.es-diff__line--del {
background: color-mix(in srgb, var(--danger-color, #d64545) 14%, transparent);
}
.es-diff__line--skip {
padding: 2px 8px;
color: var(--muted-color);
font-style: italic;
background: var(--code-bg);
}
/* --- Data drawer --- */
.es-data-drawer {
display: flex;
flex-direction: column;
flex: 0 0 42%;
min-height: 160px;
border-top: 1px solid var(--border-color);
background: var(--page-bg);
}
.es-data-drawer__header {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 10px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-data-drawer__files {
display: flex;
gap: 4px;
flex: 1;
min-width: 0;
overflow-x: auto;
}
.es-data-drawer__file {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 3px 9px;
border: 1px solid transparent;
border-radius: 6px;
background: none;
font: inherit;
font-size: 12px;
color: var(--muted-color);
cursor: pointer;
white-space: nowrap;
}
.es-data-drawer__file--active {
color: var(--text-color);
border-color: var(--border-color);
background: var(--page-bg);
font-weight: 600;
}
.es-data-drawer__used {
display: inline-flex;
align-items: center;
gap: 3px;
padding: 0 6px;
border-radius: 8px;
font-size: 10px;
font-weight: 600;
color: var(--primary-color);
background: color-mix(in srgb, var(--primary-color) 12%, transparent);
}
.es-data-drawer__body {
flex: 1;
min-height: 0;
overflow: auto;
padding: 10px;
}
.es-data-drawer__empty {
margin: 8px;
font-size: 12px;
color: var(--muted-color);
}
.es-data-table th {
vertical-align: bottom;
}
.es-data-table__col {
display: block;
}
.es-data-table__type {
display: inline-block;
margin-top: 2px;
padding: 0 5px;
border-radius: 4px;
font-size: 9.5px;
font-weight: 600;
letter-spacing: 0.03em;
color: var(--muted-color);
background: var(--code-bg);
}
.es-data-table__type--number { color: #1c7ed6; }
.es-data-table__type--date { color: #7048e8; }
.es-data-table__type--boolean { color: #e8590c; }
.es-data-table__num {
text-align: right !important;
font-variant-numeric: tabular-nums;
}
.es-preview {
overflow: hidden;
}
@media (max-width: 900px) {
.es-header__status,
.es-header__peers {
display: none;
}
.es-header__apply {
padding-inline: 8px;
}
.es-data-drawer {
flex-basis: 50%;
}
}
/* --- Tweak panel --- */
.es-tweak {
position: absolute;
top: 46px;
right: 10px;
bottom: 10px;
z-index: 7;
width: 260px;
display: flex;
flex-direction: column;
border: 1px solid var(--border-color);
border-radius: 10px;
background: var(--page-bg);
box-shadow: 0 10px 36px rgba(0, 0, 0, 0.18);
overflow: hidden;
}
.es-tweak__header {
display: flex;
align-items: center;
gap: 8px;
padding: 8px 10px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
font-size: 12.5px;
}
.es-tweak__header span {
flex: 1;
font-size: 11px;
color: var(--muted-color);
}
.es-tweak__fields {
display: flex;
flex-direction: column;
gap: 12px;
padding: 12px;
overflow-y: auto;
}
.es-tweak__field {
display: flex;
flex-direction: column;
gap: 5px;
font-size: 12px;
}
.es-tweak__field--toggle {
flex-direction: row;
align-items: center;
gap: 8px;
}
.es-tweak__label {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 6px;
color: var(--text-color);
font-weight: 500;
}
.es-tweak__label output,
.es-tweak__label em {
font-size: 11px;
font-weight: 400;
font-style: normal;
color: var(--muted-color);
font-variant-numeric: tabular-nums;
}
.es-tweak__field input[type="range"] {
width: 100%;
accent-color: var(--primary-color);
}
.es-tweak__field input[type="text"],
.es-tweak__field select {
padding: 5px 8px;
border: 1px solid var(--border-color);
border-radius: 6px;
font: inherit;
font-size: 12px;
color: var(--text-color);
background: var(--surface-bg);
}
.es-tweak__color {
display: flex;
align-items: center;
gap: 8px;
}
.es-tweak__color input[type="color"] {
width: 36px;
height: 24px;
padding: 0;
border: 1px solid var(--border-color);
border-radius: 5px;
background: none;
}
.es-tweak__empty {
padding: 14px 12px;
font-size: 12px;
color: var(--muted-color);
}
.es-tweak__empty p {
margin: 0 0 10px;
}
.es-tweak__saved {
margin: 0;
font-size: 11px;
color: var(--muted-color);
}
/* --- Automatic check line --- */
.es-check {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
font-size: 12px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-check > svg {
flex-shrink: 0;
color: var(--muted-color);
}
.es-check--pass > svg { color: var(--success-color, #2f9e44); }
.es-check--warn > svg { color: #e8a100; }
.es-check--fail > svg,
.es-check--error > svg { color: var(--danger-color, #d64545); }
.es-check .embed-btn,
.es-check .es-version__btn {
display: inline-flex;
align-items: center;
gap: 3px;
}
.es-check__details {
margin: 0;
padding: 8px 12px 10px 34px;
list-style: none;
display: flex;
flex-direction: column;
gap: 6px;
max-height: 160px;
overflow-y: auto;
font-size: 11.5px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-check__item {
display: flex;
flex-direction: column;
gap: 2px;
color: var(--muted-color);
overflow-wrap: anywhere;
}
.es-check__item strong {
color: var(--text-color);
}
.es-check__item--fail strong::before {
content: "Fail: ";
color: var(--danger-color, #d64545);
}
.es-check__item--warn strong::before {
content: "Warning: ";
color: #e8a100;
}
/* --- @this (Inspect) --- */
.es-picked {
display: flex;
flex-direction: column;
gap: 6px;
margin-bottom: 8px;
}
.es-picked__chip {
display: inline-flex;
align-items: center;
gap: 5px;
align-self: flex-start;
max-width: 100%;
padding: 2px 4px 2px 8px;
border-radius: 999px;
font-size: 11.5px;
color: var(--text-color);
background: color-mix(in srgb, #4c6ef5 14%, transparent);
}
.es-picked__chip code {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: 11px;
}
.es-picked__chip button {
display: inline-flex;
border: none;
background: none;
padding: 2px;
color: var(--muted-color);
cursor: pointer;
}
.es-picked__edit {
display: flex;
align-items: center;
gap: 6px;
font-size: 11.5px;
color: var(--muted-color);
}
.es-picked__edit input {
flex: 1;
min-width: 0;
padding: 4px 8px;
border: 1px solid var(--border-color);
border-radius: 6px;
font: inherit;
color: var(--text-color);
background: var(--page-bg);
}
@media (max-width: 900px) {
.es-tweak {
top: auto;
left: 8px;
right: 8px;
width: auto;
max-height: 55%;
}
}
/* --- Launcher (new figure) --- */
.es-launcher-scrim {
position: fixed;
inset: 0;
z-index: var(--z-modal);
display: grid;
place-items: center;
padding: 16px;
background: rgba(0, 0, 0, 0.4);
}
.es-launcher {
width: min(860px, 100%);
max-height: calc(100vh - 32px);
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 18px;
padding: 18px 20px 22px;
border-radius: 14px;
border: 1px solid var(--border-color);
background: var(--page-bg);
color: var(--text-color);
box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
.es-launcher__header {
display: flex;
align-items: center;
gap: 8px;
}
.es-launcher__header > svg {
color: var(--primary-color);
}
.es-launcher__header h2 {
flex: 1;
margin: 0;
font-size: 16px;
}
.es-launcher__describe {
display: flex;
flex-direction: column;
gap: 8px;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 10px;
background: var(--surface-bg);
}
.es-launcher__describe--drop {
border: 2px dashed var(--primary-color);
background: color-mix(in srgb, var(--primary-color) 8%, var(--surface-bg));
}
.es-launcher__describe label {
font-size: 12px;
font-weight: 600;
}
.es-launcher__describe textarea {
width: 100%;
resize: vertical;
min-height: 64px;
padding: 8px 10px;
border: 1px solid var(--border-color);
border-radius: 8px;
font: inherit;
font-size: 13.5px;
line-height: 1.5;
color: var(--text-color);
background: var(--page-bg);
}
.es-launcher__describe textarea:focus {
outline: none;
border-color: var(--primary-color);
}
.es-launcher__row {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 8px;
}
.es-launcher__row .embed-btn {
display: inline-flex;
align-items: center;
gap: 5px;
}
.es-launcher__hint {
font-size: 11.5px;
color: var(--muted-color);
}
.es-launcher__section h3 {
margin: 0 0 8px;
font-size: 12px;
font-weight: 600;
color: var(--muted-color);
}
.es-launcher__starters {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 10px;
}
.es-launcher__starter {
display: flex;
flex-direction: column;
gap: 4px;
min-width: 0;
padding: 0 0 10px;
border: 1px solid var(--border-color);
border-radius: 10px;
overflow: hidden;
background: var(--page-bg);
color: var(--text-color);
font: inherit;
text-align: left;
cursor: pointer;
transition: border-color 120ms ease, transform 120ms ease;
}
.es-launcher__starter:hover,
.es-launcher__starter:focus-visible {
border-color: var(--primary-color);
outline: none;
}
.es-launcher__starter strong,
.es-launcher__starter > span {
padding: 0 10px;
}
.es-launcher__starter strong {
font-size: 12.5px;
}
.es-launcher__starter > span {
font-size: 11px;
line-height: 1.4;
color: var(--muted-color);
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.es-launcher__thumb {
position: relative;
height: 112px;
overflow: hidden;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
pointer-events: none;
}
.es-launcher__thumb iframe {
position: absolute;
top: 0;
left: 0;
border: none;
transform: scale(0.3);
transform-origin: 0 0;
}
.es-launcher__charts {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.es-launcher__chart {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 10px;
border: 1px solid var(--border-color);
border-radius: 8px;
background: var(--surface-bg);
color: var(--text-color);
font: inherit;
font-size: 12px;
cursor: pointer;
}
.es-launcher__chart:hover {
border-color: var(--primary-color);
}
@media (max-width: 760px) {
.es-launcher__starters {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}
@media (prefers-reduced-motion: reduce) {
.es-launcher__starter {
transition: none;
}
}
/* ============================================================================ */
/* Embed Studio - Full-screen chart editor panel */
/* ============================================================================ */
.embed-studio {
position: fixed;
inset: 0;
z-index: var(--z-modal);
display: flex;
flex-direction: column;
background: var(--page-bg);
color: var(--text-color);
}
/* --- Header --- */
.es-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
border-bottom: 1px solid var(--border-color);
background: var(--surface-bg);
flex-shrink: 0;
}
.es-header__left {
display: flex;
align-items: center;
gap: 8px;
}
.es-header__icon {
color: var(--primary-color);
}
.es-header__model {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 2px 8px;
border-radius: 999px;
border: 1px solid var(--border-color);
font-size: 11px;
color: var(--muted-color);
white-space: nowrap;
max-width: 220px;
overflow: hidden;
text-overflow: ellipsis;
}
.es-header__left {
min-width: 0;
}
.es-header__files-toggle {
display: none;
}
.es-header__title {
font-size: 14px;
font-weight: 600;
}
.es-header__src {
font-family: var(--font-mono);
font-size: 12px;
color: var(--muted-color);
background: var(--code-bg);
padding: 2px 6px;
border-radius: 4px;
}
.es-header__actions {
display: flex;
gap: 4px;
}
/* --- Body: split panel --- */
.es-body {
display: flex;
flex: 1;
min-height: 0;
}
/* --- Chat panel (left) --- */
.es-chat {
width: 400px;
min-width: 320px;
max-width: 480px;
display: flex;
flex-direction: column;
border-right: 1px solid var(--border-color);
}
.es-chat__messages {
flex: 1;
overflow-y: auto;