tempad {
  display: block;
  position: absolute;

  font-family: var(--font-family-ui);
  font-size: 11px;
  color: var(--text-primary);
}

[data-fpl-version="ui3"] tempad {
  color: var(--color-text);
}

tempad *,
tempad *::before,
tempad *::after {
  box-sizing: border-box;
}

/** Tiny utility classes */
tempad .tp-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

tempad .tp-row-justify {
  justify-content: space-between;
}

tempad .tp-shrink {
  flex-shrink: 1;
  min-width: 0;
}

tempad .tp-gap {
  gap: 0;
}

tempad .tp-gap-l {
  gap: var(--spacer-1);
}

tempad .tp-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

tempad select {
  appearance: none;
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 0 20px 0 7px;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg class='svg' xmlns='http://www.w3.org/2000/svg' width='8' height='7' viewBox='0 0 8 7'%3E%3Cpath fill='%230000004d' fill-opacity='1' fill-rule='evenodd' stroke='none' d='m3.646 5.354-3-3 .708-.708L4 4.293l2.646-2.647.708.708-3 3L4 5.707l-.354-.353z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center right 8px;
}

[data-preferred-theme="dark"] tempad select {
  background-image: url("data:image/svg+xml,%3Csvg class='svg' xmlns='http://www.w3.org/2000/svg' width='8' height='7' viewBox='0 0 8 7'%3E%3Cpath fill='%23ffffff66' fill-opacity='1' fill-rule='evenodd' stroke='none' d='m3.646 5.354-3-3 .708-.708L4 4.293l2.646-2.647.708.708-3 3L4 5.707l-.354-.353z'%3E%3C/path%3E%3C/svg%3E");
}

tempad select:focus-visible {
  border: 1px solid var(--color-border-selected);
  outline: 1px solid var(--color-border-selected);
  outline-offset: -2px;
}

tempad input:not([type]),
tempad input[type="text"],
tempad input[type="number"] {
  height: 28px;
  border: 1px solid var(--color-border);
  border-radius: 2px;
  padding: 0 7px;
  background-color: var(--color-bg);
}

tempad input[type="number"]::-webkit-inner-spin-button,
tempad input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

tempad input[type="text"]:focus-visible,
tempad input[type="number"]:focus-visible {
  border: 1px solid var(--color-border-selected);
  outline: 1px solid var(--color-border-selected);
  outline-offset: -2px;
}

tempad ::-webkit-scrollbar {
  width: 11px;
  height: 11px;
  background-color: transparent;
  border: 0 solid var(--color-border);
}

tempad ::-webkit-scrollbar:horizontal {
  border-top-width: 1px;
}

tempad ::-webkit-scrollbar:vertical {
  border-left-width: 1px;
}

tempad ::-webkit-scrollbar-thumb {
  border-radius: 8px;
  border: solid transparent;
  border-width: 3px 2px 2px 3px;
  background-clip: content-box;
  background-color: var(--color-scrollbar);
}

[data-fpl-version="ui3"] tempad .tp-gap {
  gap: var(--spacer-1);
}

[data-fpl-version="ui3"] tempad .tp-gap-l {
  gap: var(--spacer-2);
}

[data-fpl-version="ui3"] tempad select {
  height: var(--spacer-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  background-image: url("data:image/svg+xml,%3Csvg class='svg' xmlns='http://www.w3.org/2000/svg' width='8' height='7' viewBox='0 0 8 7'%3E%3Cpath fill='%23000000e5' fill-opacity='1' fill-rule='evenodd' stroke='none' d='m3.646 5.354-3-3 .708-.708L4 4.293l2.646-2.647.708.708-3 3L4 5.707l-.354-.353z'%3E%3C/path%3E%3C/svg%3E");
  font-family: var(--text-body-medium-font-family);
  font-size: var(--text-body-medium-font-size);
  font-weight: var(--text-body-medium-font-weight);
  letter-spacing: var(--text-body-medium-letter-spacing);
  line-height: var(--text-body-medium-line-height);
}

[data-preferred-theme="dark"][data-fpl-version="ui3"] tempad select {
  background-image: url("data:image/svg+xml,%3Csvg class='svg' xmlns='http://www.w3.org/2000/svg' width='8' height='7' viewBox='0 0 8 7'%3E%3Cpath fill='%23fff' fill-opacity='1' fill-rule='evenodd' stroke='none' d='m3.646 5.354-3-3 .708-.708L4 4.293l2.646-2.647.708.708-3 3L4 5.707l-.354-.353z'%3E%3C/path%3E%3C/svg%3E");
}

[data-fpl-version="ui3"] tempad input[type="text"],
[data-fpl-version="ui3"] tempad input[type="number"] {
  height: var(--spacer-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-medium);
  border-color: var(--color-bg-secondary);
  background-color: var(--color-bg-secondary);
  font-family: var(--text-body-medium-font-family);
  font-size: var(--text-body-medium-font-size);
  font-weight: var(--text-body-medium-font-weight);
  letter-spacing: var(--text-body-medium-letter-spacing);
  line-height: var(--text-body-medium-line-height);
}

[data-fpl-version="ui3"] tempad select:focus-visible,
[data-fpl-version="ui3"] tempad input[type="text"]:focus,
[data-fpl-version="ui3"] tempad input[type="number"]:focus {
  border-color: var(--color-border-selected);
  outline: unset;
}

#react-page:not(:has(#fullscreen-root .gpu-view-content canvas):has(#left-panel-container))
  ~ tempad {
  display: none;
}
