@import url("./runtime-loading.css");

:root {
  --meta-ui-bg: #0f141a;
  --meta-ui-panel: #171d24;
  --meta-ui-panel-2: #202832;
  --meta-ui-panel-3: #0b1116;
  --meta-ui-line: #34404b;
  --meta-ui-line-soft: #24303a;
  --meta-ui-text: #edf2f5;
  --meta-ui-muted: #9ca8b5;
  --meta-ui-accent: #73c8a5;
  --meta-ui-accent-soft: #18372f;
  --meta-ui-blue: #78aee8;
  --meta-ui-danger: #ff8d88;
  --meta-ui-warning: #f0b95a;
  --meta-ui-header-height: 54px;
  --meta-ui-control-height: 32px;
  --meta-ui-control-radius: 7px;
  --meta-ui-control-bg: var(--meta-ui-panel);
  --meta-ui-control-bg-hover: #202a34;
  --meta-ui-control-border-hover: #4a6374;
  --meta-ui-row-height: 30px;
  --meta-ui-list-row-radius: 6px;
  --meta-ui-icon-button-size: 32px;
  --meta-ui-panel-radius: 7px;
  --meta-ui-workbench-left-width: 320px;
  --meta-ui-workbench-right-width: 420px;
  --meta-ui-workbench-rail-width: 42px;
  --meta-ui-workbench-splitter-width: 6px;
  --meta-ui-workbench-panel-header-height: 40px;
  --meta-ui-workbench-panel-header-padding: 6px 10px;
  --meta-ui-space-1: 4px;
  --meta-ui-space-2: 8px;
  --meta-ui-space-3: 12px;
  --meta-ui-space-4: 16px;
  --meta-ui-focus-ring: rgb(115 200 165 / 0.62);
  --editor-shell-bg: var(--meta-ui-bg);
  --editor-shell-panel: var(--meta-ui-panel);
  --editor-shell-panel-2: var(--meta-ui-panel-2);
  --editor-shell-line: var(--meta-ui-line);
  --editor-shell-text: var(--meta-ui-text);
  --editor-shell-muted: var(--meta-ui-muted);
  --editor-shell-accent: var(--meta-ui-accent);
  --editor-shell-blue: var(--meta-ui-blue);
}

.shared-editor-header,
.project-run-dialog {
  font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shared-editor-project-context {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

.project-run-controls,
.project-run-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.project-run-controls select,
.project-run-dialog button {
  font: inherit;
  min-height: 30px;
  border: 1px solid var(--meta-ui-line);
  border-radius: 6px;
  background: var(--meta-ui-panel);
  color: var(--meta-ui-text);
}

.project-run-dialog {
  box-sizing: border-box;
  width: min(1180px, 96vw);
  height: min(880px, 94vh);
  max-width: 96vw;
  max-height: 94vh;
  padding: 12px;
  border: 1px solid var(--meta-ui-line);
  border-radius: 8px;
  background: var(--meta-ui-bg);
  color: var(--meta-ui-text);
}

.project-run-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.project-run-dialog::backdrop { background: rgb(0 0 0 / 0.65); }
.project-run-dialog header { display: flex; align-items: center; gap: 12px; }
.project-run-dialog [data-project-run-close] { margin-left: auto; }
.project-run-dialog [data-project-run-surface] { display: flex; flex: 1; min-height: 0; overflow: hidden; background: #070a0d; }
.project-run-dialog iframe { flex: 1; min-height: 0; width: 100%; border: 0; }
.project-run-dialog iframe[hidden] { display: none; }
.project-run-dialog details { flex: none; max-height: 24%; overflow: auto; }
.project-run-dialog pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; }

@media (max-width: 800px) {
  .shared-editor-project-context { flex-wrap: wrap; gap: 6px; }
}

.shared-editor-header {
  min-width: 0;
  min-height: var(--meta-ui-header-height);
  display: grid;
  grid-template-columns: minmax(460px, 1fr) minmax(220px, auto) minmax(40px, 1fr);
  align-items: center;
  gap: 16px;
  padding: 7px 16px;
  border-bottom: 1px solid var(--editor-shell-line);
  background: var(--editor-shell-bg);
  color: var(--editor-shell-text);
}

.shared-editor-page {
  background: var(--meta-ui-bg);
  color: var(--meta-ui-text);
}

.shared-editor-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.shared-editor-primary-navigation {
  flex: 0 1 auto;
}

.shared-editor-brand-title {
  min-width: 0;
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.shared-editor-brand-title h1 {
  margin: 0;
  color: var(--editor-shell-text);
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.shared-editor-brand-title span {
  overflow: hidden;
  color: var(--editor-shell-muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-editor-mark {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #2e6658;
  border-radius: 8px;
  background: #17342e;
  color: var(--editor-shell-accent);
  font-size: 12px;
  font-weight: 700;
}

.shared-editor-navigation,
.shared-editor-mode-switch,
.shared-editor-actions,
.shared-editor-project-identity,
.shared-editor-account {
  min-width: 0;
  display: flex;
  align-items: center;
}

.shared-editor-navigation {
  justify-self: center;
  gap: 8px;
}

.shared-editor-mode-switch {
  gap: 18px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.shared-editor-button,
.shared-editor-nav-link,
.shared-editor-mode-button {
  min-height: var(--meta-ui-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--editor-shell-text);
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.shared-editor-mode-button {
  padding: 0 0 2px;
  position: relative;
  font-size: 13px;
  font-weight: 600;
}

.shared-editor-button {
  padding: 0 12px;
  border: 1px solid rgba(128, 151, 170, 0.28);
  border-radius: var(--meta-ui-control-radius);
  background: rgba(32, 40, 50, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.shared-editor-button.is-compact {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.shared-editor-nav-link {
  padding: 0 10px;
  border-color: var(--editor-shell-line);
  background: var(--editor-shell-panel);
  color: var(--editor-shell-muted);
  font-size: 13px;
  font-weight: 600;
}

.shared-editor-mode-button:hover,
.shared-editor-nav-link:hover,
.shared-editor-button:hover {
  color: var(--editor-shell-text);
}

.shared-editor-button:hover,
.shared-editor-nav-link:hover {
  border-color: var(--meta-ui-control-border-hover);
  background: var(--meta-ui-control-bg-hover);
}

.shared-editor-mode-button.is-active,
.shared-editor-button.is-active {
  color: var(--editor-shell-accent);
}

.shared-editor-button:focus-visible,
.shared-editor-nav-link:focus-visible,
.shared-editor-mode-button:focus-visible {
  outline: 2px solid var(--meta-ui-focus-ring);
  outline-offset: 2px;
}

.shared-editor-button:disabled,
.shared-editor-button[aria-disabled="true"] {
  cursor: default;
  opacity: 0.48;
}

.shared-editor-mode-button::after {
  background: transparent;
  bottom: 0;
  content: "";
  height: 2px;
  left: 0;
  position: absolute;
  right: 0;
}

.shared-editor-mode-button.is-active::after {
  background: var(--editor-shell-accent);
}

.shared-editor-workspace-header {
  box-sizing: border-box;
  height: var(--meta-ui-workbench-panel-header-height, 40px);
  min-height: var(--meta-ui-workbench-panel-header-height, 40px);
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow: hidden;
  padding: 3px 10px;
  border-bottom: 1px solid var(--meta-ui-line);
  background: var(--meta-ui-panel);
}

.shared-editor-workspace-header-left,
.shared-editor-workspace-header-center,
.shared-editor-workspace-header-actions {
  height: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
}

.shared-editor-workspace-header-left {
  justify-content: flex-start;
}

.shared-editor-workspace-header-center {
  justify-content: center;
  overflow: hidden;
}

.shared-editor-workspace-header-actions {
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
}

.shared-editor-workspace-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--editor-shell-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-editor-mode-tabs {
  box-sizing: border-box;
  height: var(--meta-ui-control-height, 32px);
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(128, 151, 170, 0.22);
  border-radius: 6px;
  background: rgba(10, 15, 20, 0.34);
  line-height: 1;
}

.shared-editor-mode-icon-tab {
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--editor-shell-muted);
  line-height: 1;
  padding: 0;
  text-decoration: none;
}

.shared-editor-mode-icon-tab:hover {
  border-color: rgba(128, 151, 170, 0.22);
  background: rgba(115, 200, 165, 0.08);
  color: var(--editor-shell-text);
}

.shared-editor-mode-icon-tab.is-active {
  border-color: rgba(115, 200, 165, 0.45);
  background: rgba(115, 200, 165, 0.14);
  color: var(--editor-shell-accent);
}

.shared-editor-mode-icon-tab:focus-visible {
  outline: 2px solid var(--meta-ui-focus-ring);
  outline-offset: 2px;
}

.shared-editor-mode-icon {
  box-sizing: border-box;
  width: 14px;
  height: 14px;
  display: inline-block;
  position: relative;
  color: currentColor;
  flex: none;
}

.shared-editor-mode-icon.is-agent::before,
.shared-editor-mode-icon.is-agent::after {
  content: "";
  display: block;
  position: absolute;
}

.shared-editor-mode-icon.is-agent::before {
  inset: 1px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}

.shared-editor-mode-icon.is-agent::after {
  width: 2.5px;
  height: 2.5px;
  left: 5.75px;
  top: 5.75px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: -3.75px 0 0 currentColor, 3.75px 0 0 currentColor;
}

.shared-editor-mode-icon.is-meta::before,
.shared-editor-mode-icon.is-meta::after {
  content: "";
  display: block;
  position: absolute;
}

.shared-editor-mode-icon.is-meta::before {
  width: 4px;
  height: 4px;
  left: 5px;
  top: 0;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  filter: drop-shadow(-5px 9px 0 currentColor) drop-shadow(5px 0 0 currentColor);
}

.shared-editor-mode-icon.is-meta::after {
  width: 9px;
  height: 6px;
  left: 2.5px;
  top: 6px;
  border-top: 1.5px solid currentColor;
  border-left: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
}

.shared-editor-mode-icon.is-table {
  border: 1.5px solid currentColor;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) 50% 0 / 1.5px 100% no-repeat,
    linear-gradient(currentColor, currentColor) 0 50% / 100% 1.5px no-repeat;
}

.shared-editor-actions {
  justify-content: flex-end;
  gap: 8px;
}

.shared-editor-project-identity {
  justify-self: center;
  justify-content: center;
  gap: 10px;
  font-size: 12px;
  text-align: center;
}

.shared-editor-project-identity strong,
.shared-editor-project-identity span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shared-editor-project-identity strong {
  max-width: 360px;
  font-size: 16px;
  font-weight: 650;
  line-height: 1;
}

.shared-editor-project-identity span {
  max-width: 260px;
  color: var(--editor-shell-muted);
}

.shared-editor-account {
  position: relative;
  justify-self: end;
  justify-content: flex-end;
}

.shared-editor-user-chip {
  padding: 0;
  width: 34px;
  min-width: 34px;
  min-height: var(--meta-ui-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--meta-ui-line);
  border-radius: 999px;
  background: var(--meta-ui-panel-2);
  color: var(--meta-ui-accent);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: default;
}

.shared-editor-user-chip:focus-visible {
  outline: 2px solid var(--meta-ui-focus-ring);
  outline-offset: 2px;
}

.shared-editor-local-resource-trigger {
  position: relative;
  width: 34px;
  min-width: 34px;
  min-height: var(--meta-ui-control-height);
  margin-right: 6px;
  border: 1px solid var(--meta-ui-line);
  border-radius: 999px;
  background: var(--meta-ui-panel-2);
  color: var(--meta-ui-accent);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}
.shared-editor-local-resource-trigger::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: 2px;
  bottom: 2px;
  border: 1px solid var(--meta-ui-panel-2);
  border-radius: 50%;
  background: var(--meta-ui-line);
}
.shared-editor-local-resource-trigger[data-state="ready"]::after { background: #42a875; }
.shared-editor-local-resource-trigger[data-state="connecting"]::after,
.shared-editor-local-resource-trigger[data-state="authorizationRequired"]::after { background: #d4a642; }
.shared-editor-local-resource-trigger[data-state="degraded"]::after,
.shared-editor-local-resource-trigger[data-state="notRunning"]::after { background: #d66b54; }
.shared-editor-local-resource-trigger:hover { border-color: var(--meta-ui-control-border-hover); }
.shared-editor-local-resource-trigger:focus-visible { outline: 2px solid var(--meta-ui-focus-ring); outline-offset: 2px; }

.compact-file-local-resource-state {
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  height: 14px;
  justify-content: center;
  line-height: 1;
  width: 14px;
}
.compact-file-local-resource-state.status-missing,
.compact-file-local-resource-state.status-corrupt { color: #ffc4bd; }
.compact-file-local-resource-state.status-unknown { color: #ffd27a; }
.content-tree-local-resource-badge {
  margin-left: auto;
  align-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: inline-flex;
  font-size: 10px;
  font-weight: 700;
  height: 14px;
  justify-content: center;
  line-height: 1;
  width: 14px;
}
.content-tree-local-resource-badge.status-missing,
.content-tree-local-resource-badge.status-corrupt { color: #ffc4bd; }
.content-tree-local-resource-badge.status-unknown { color: #ffd27a; }
.local-resource-inspector-action { margin: 4px 6px 4px 0; }

.local-resource-drawer {
  position: fixed;
  z-index: 1100;
  top: calc(var(--meta-ui-header-height) + 8px);
  right: 8px;
  width: min(390px, calc(100vw - 16px));
  max-height: calc(100dvh - var(--meta-ui-header-height) - 16px);
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--meta-ui-line);
  border-radius: 8px;
  background: var(--meta-ui-panel);
  color: var(--meta-ui-text);
  box-shadow: 0 12px 40px rgb(0 0 0 / 0.48);
  font: 13px/1.45 Inter, ui-sans-serif, system-ui, sans-serif;
}
.local-resource-drawer[hidden] { display: none; }
.local-resource-drawer header, .local-resource-actions { display: flex; align-items: center; gap: 8px; }
.local-resource-drawer header { justify-content: space-between; margin-bottom: 8px; }
.local-resource-drawer button, .local-resource-drawer select { min-height: 30px; border: 1px solid var(--meta-ui-line); border-radius: 6px; padding: 4px 8px; background: var(--meta-ui-panel-2); color: inherit; font: inherit; }
.local-resource-drawer [data-lr-status] { overflow-wrap: anywhere; color: var(--meta-ui-muted); }
.local-resource-drawer [data-lr-status][data-state="error"] { color: var(--meta-ui-danger); }
.local-resource-drawer label { display: grid; gap: 5px; margin: 10px 0; }
.local-resource-drawer select { width: 100%; }
.local-resource-drawer ul { padding-left: 20px; max-height: 25vh; overflow: auto; }
.local-resource-drawer li { overflow-wrap: anywhere; color: var(--meta-ui-muted); }
.local-resource-drawer li[data-status="available"] { color: var(--meta-ui-accent); }
.local-resource-drawer li[data-status="corrupt"] { color: var(--meta-ui-danger); }
.local-resource-drawer pre { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 20vh; overflow: auto; font-size: 11px; }

.shared-editor-header-action-group {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}


:where(.meta-ui-button) {
  min-height: var(--meta-ui-control-height);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--meta-ui-line);
  border-radius: var(--meta-ui-control-radius);
  background: var(--meta-ui-control-bg);
  color: var(--meta-ui-text);
  padding: 0 12px;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

:where(.meta-ui-button:hover:not(:disabled):not([aria-disabled="true"])) {
  border-color: var(--meta-ui-control-border-hover);
  background: var(--meta-ui-control-bg-hover);
}

:where(.meta-ui-button:focus-visible) {
  outline: 2px solid var(--meta-ui-focus-ring);
  outline-offset: 2px;
}

:where(.meta-ui-button:disabled, .meta-ui-button[aria-disabled="true"]) {
  cursor: default;
  opacity: 0.48;
}

:where(.meta-ui-input, .meta-ui-select, .meta-ui-textarea) {
  min-height: var(--meta-ui-control-height);
  border: 1px solid var(--meta-ui-line);
  border-radius: var(--meta-ui-control-radius);
  background: var(--meta-ui-panel-3);
  color: var(--meta-ui-text);
}

:where(.meta-ui-input, .meta-ui-select) {
  padding: 0 10px;
}

:where(.meta-ui-textarea) {
  padding: 8px 10px;
}

:where(.meta-ui-input:focus-visible, .meta-ui-select:focus-visible, .meta-ui-textarea:focus-visible) {
  outline: 2px solid var(--meta-ui-focus-ring);
  outline-offset: 2px;
}

:where(.meta-ui-list-row) {
  min-height: var(--meta-ui-row-height);
  border: 1px solid transparent;
  border-radius: var(--meta-ui-list-row-radius);
  background: transparent;
  color: var(--meta-ui-text);
}

:where(.meta-ui-list-row:hover) {
  border-color: rgba(128, 151, 170, 0.24);
  background: rgb(255 255 255 / 0.035);
}

:where(.meta-ui-list-row.is-active, .meta-ui-list-row[aria-selected="true"]) {
  border-color: rgba(115, 200, 165, 0.42);
  background: rgba(115, 200, 165, 0.13);
  box-shadow: inset 3px 0 0 var(--meta-ui-accent);
}

@media (max-width: 980px) {
  .shared-editor-header {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-content: flex-start;
    padding: 8px 12px;
  }

  .shared-editor-brand,
  .shared-editor-navigation,
  .shared-editor-project-identity,
  .shared-editor-account,
  .shared-editor-actions {
    width: 100%;
    flex: 1 1 100%;
    justify-content: flex-start;
  }

  .shared-editor-brand { flex-wrap: wrap; }

  .shared-editor-navigation,
  .shared-editor-mode-switch {
    min-width: 0;
    overflow-x: auto;
  }

  .shared-editor-project-identity {
    justify-content: flex-start;
    text-align: left;
  }

  .shared-editor-account {
    justify-content: flex-start;
  }
}
