.preview3d-live-panel {
  display: grid;
  gap: 12px;
}

.preview3d-viewer-frame {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: var(--border-width) solid rgba(255, 255, 255, 0.14);
  border-radius: 0px;;
  background: #101113;
}

.preview3d-viewer-frame canvas {
  display: block;
  width: 100%;
  height: 420px;
}

.preview3d-viewer-frame span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  pointer-events: none;
}

.preview3d-texture-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 280px;
  overflow: hidden;
  border: var(--border-width) solid rgba(255, 255, 255, 0.14);
  border-radius: 0px;;
  background: #101113;
}

.preview3d-texture-frame img {
  display: none;
  width: 100%;
  height: 100%;
  max-height: 420px;
  object-fit: contain;
}

.preview3d-texture-frame span {
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
}

.preview3d-status {
  min-height: 112px;
  padding: 12px;
  white-space: pre-wrap;
  border: var(--border-width) solid rgba(255, 255, 255, 0.12);
  border-radius: 0px;;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.45;
}

.livery-preview-workspace {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  --numberplate-panel-width: clamp(360px, 28vw, 440px);
  --numberplate-dev-panel-width: clamp(420px, 34vw, 560px);
  --scene-settings-panel-width: clamp(360px, 28vw, 440px);
  width: 100vw;
  height: 100vh;
  background: #090b0e;
  color: var(--ink);
}

.livery-preview-workspace.is-numberplate-panel-open {
  grid-template-rows: auto minmax(0, 1fr);
}

.livery-preview-workspace.is-numberplate-dev-panel-open {
  grid-template-rows: auto minmax(0, 1fr);
}

.livery-preview-workspace.is-scene-settings-panel-open {
  grid-template-rows: auto minmax(0, 1fr);
}

.livery-preview-workspace.has-splat-legend {
  grid-template-rows: auto auto minmax(0, 1fr);
}

.livery-preview-workspace[hidden] {
  display: none;
}

.livery-preview-topbar {
  grid-row: 1;
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 54px;
  padding: 0 14px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(16, 18, 22, 0.98);
}

.livery-preview-splat-legend {
  grid-row: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 14px;
  gap: 18px;
  overflow-x: auto;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.1);
  background: rgba(9, 11, 14, 0.96);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  white-space: nowrap;
}

.livery-preview-splat-legend[hidden] {
  display: none;
}

.livery-preview-splat-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.livery-preview-splat-swatch {
  display: inline-block;
  width: 22px;
  height: 12px;
  flex: 0 0 auto;
  border: var(--border-width) solid rgba(255, 255, 255, 0.28);
  background: var(--splat-color);
}

.livery-preview-title {
  display: grid;
  gap: 3px;
  flex: 1 1 auto;
  min-width: 0;
}

.livery-preview-title strong {
  font-size: 15px;
  line-height: 1.2;
}

.livery-preview-title span {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.livery-preview-menu {
  position: relative;
  z-index: 31;
  display: flex;
  flex: 1 1 auto;
  align-items: stretch;
  justify-content: flex-end;
  gap: 2px;
  max-width: 100%;
}

.livery-preview-menu-group {
  position: relative;
  display: flex;
  align-items: stretch;
}

.livery-preview-menu-group.is-disabled {
  opacity: 0.38;
  filter: grayscale(0.8);
}

.livery-preview-menu-trigger,
.livery-preview-menu > button {
  min-height: 53px;
  padding: 0 13px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
}

.livery-preview-menu-trigger:hover,
.livery-preview-menu-trigger:focus-visible,
.livery-preview-menu-group.is-open > .livery-preview-menu-trigger,
.livery-preview-menu > button:hover,
.livery-preview-menu > button:focus-visible {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.livery-preview-menu-trigger:disabled,
.livery-preview-menu-dropdown button:disabled,
.livery-preview-menu-check input:disabled + span {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.5);
}

.livery-preview-menu > .primary {
  align-self: center;
  min-height: 34px;
  margin-left: 8px;
  padding: 6px 12px;
  border: var(--border-width) solid rgba(var(--accent-2-rgb), 0.72);
  border-radius: 0px;;
  background: rgba(var(--accent-2-rgb), 0.2);
  color: #fff;
}

.livery-preview-menu > .primary:hover,
.livery-preview-menu > .primary:focus-visible {
  background: rgba(var(--accent-2-rgb), 0.3);
}

.livery-preview-menu > .livery-preview-action {
  align-self: center;
  min-height: 34px;
  margin-left: 8px;
  padding: 6px 12px;
  border: var(--border-width) solid #ff4d55;
  border-radius: 0;
  background: #000;
  color: #fff;
}

.livery-preview-menu > .livery-preview-action.primary {
  border-color: var(--accent-2-border);
  background: var(--accent-2);
  color: #fff;
  font-weight: 700;
}

.livery-preview-menu > .livery-preview-action:hover,
.livery-preview-menu > .livery-preview-action:focus-visible {
  border-color: #ff7077;
  background: rgba(255, 77, 85, 0.14);
}

.livery-preview-menu > .livery-preview-action.primary:hover,
.livery-preview-menu > .livery-preview-action.primary:focus-visible {
  background: var(--accent-2-hover);
}

.livery-preview-menu-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  z-index: 40;
  display: none;
  min-width: 224px;
  max-width: 320px;
  padding: 7px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.14);
  border-radius: 0 0 8px 8px;
  background: rgba(12, 14, 18, 0.98);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38);
}

.livery-preview-menu-group.is-open > .livery-preview-menu-dropdown {
  display: grid;
  gap: 3px;
}

.livery-preview-menu-dropdown button,
.livery-preview-menu-check,
.livery-preview-menu-select {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  width: 100%;
  min-height: 32px;
  padding: 6px 8px;
  border: 0;
  border-radius: 0px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  text-align: left;
}

.livery-preview-menu-dropdown button:hover,
.livery-preview-menu-dropdown button:focus-visible,
.livery-preview-menu-check:hover,
.livery-preview-menu-select:hover,
.livery-preview-menu-select:focus-within {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.livery-preview-menu-dropdown button.active,
.livery-preview-menu-dropdown button[aria-checked="true"] {
  background: rgba(var(--accent-2-rgb), 0.22);
  color: #fff;
}

.livery-preview-menu-dropdown button.active::before,
.livery-preview-menu-dropdown button[aria-checked="true"]::before {
  content: "";
  width: 6px;
  min-width: 6px;
  height: 18px;
  background: var(--accent-2);
}

.livery-preview-menu-check input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0;
}

.livery-preview-menu-select {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
  gap: 5px;
  border-color: rgba(var(--accent-2-rgb), 0.42);
  background: rgba(var(--accent-2-rgb), 0.06);

  &:hover,
  &:focus-within {
    border-color: rgba(var(--accent-2-rgb), 0.72);
    background: rgba(var(--accent-2-rgb), 0.12);
  }
}

.livery-preview-menu-select span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.livery-preview-menu-label {
  display: block;
  padding: 2px 8px 1px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
}

.livery-preview-menu-select select {
  width: 100%;
  min-height: 28px;
  padding: 3px 26px 3px 8px;
  border-color: rgba(var(--accent-2-rgb), 0.42);
  background-color: rgba(0, 0, 0, 0.3);
  color: #fff;
  font-size: 14px;

  &:focus {
    border-color: rgba(var(--accent-2-rgb), 0.72);
    box-shadow: 0 0 0 2px rgba(var(--accent-2-rgb), 0.16);
  }
}

.livery-preview-menu-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  width: 100%;
}

.livery-preview-menu-toggle button {
  justify-content: center;
}

.livery-preview-menu-list {
  display: grid;
  gap: 3px;
  width: 100%;
  max-height: min(48vh, 360px);
  overflow: auto;
}

.livery-preview-menu-list button {
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  justify-content: flex-start;
  column-gap: 8px;
  row-gap: 2px;
}

.livery-preview-menu-list button::before {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.livery-preview-menu-list button span,
.livery-preview-menu-list button small {
  grid-column: 2;
}

.livery-preview-menu-list button small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 11px;
  line-height: 1.2;
}

.livery-preview-menu-color {
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
}

.livery-preview-menu-color span {
  align-self: center;
}

.livery-preview-menu-color input[type="color"] {
  width: 44px;
  height: 28px;
  padding: 2px;
  border: var(--border-width) solid rgba(var(--accent-2-rgb), 0.42);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
}

.livery-preview-camera-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.livery-preview-camera-presets button {
  min-height: 30px;
  padding: 5px 9px;
  border-color: rgba(255, 255, 255, 0.16);
  font-size: 14px;
}

.livery-preview-camera-presets button.active {
  border-color: rgba(var(--accent-2-rgb), 0.72);
  background: rgba(var(--accent-2-rgb), 0.2);
  color: #fff;
}

.livery-preview-menu button.is-active-danger {
  border-color: rgba(var(--accent-2-rgb), 0.72);
  background: rgba(var(--accent-2-rgb), 0.24);
  color: #fff;
}

.livery-preview-watch-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 30px;
  max-width: 220px;
  padding: 5px 10px;
  overflow: hidden;
  border: var(--border-width) solid rgba(255, 255, 255, 0.14);
  border-radius: 0px;;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.livery-preview-watch-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.38);
}

.livery-preview-watch-badge.is-loading::before,
.livery-preview-watch-badge.is-reloading::before {
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 202, 82, 0.28);
  border-top-color: #ffca52;
  background: transparent;
  animation: livery-preview-watch-spin 0.8s linear infinite;
}

.livery-preview-watch-badge.is-watching::before {
  background: #2dd47f;
}

.livery-preview-watch-badge.is-reloading::before {
  border-top-color: #ffca52;
}

.livery-preview-watch-badge.is-error::before {
  background: var(--accent-2);
}

.livery-preview-watch-badge.is-stopped::before {
  background: rgba(255, 255, 255, 0.38);
}

.livery-preview-watch-badge.is-success::before {
  background: #2dd47f;
}

@keyframes livery-preview-watch-spin {
  to {
    transform: rotate(360deg);
  }
}

.livery-preview-select {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 8px;
  border: var(--border-width) solid rgba(var(--accent-2-rgb), 0.42);
  border-radius: 0px;;
  background: rgba(var(--accent-2-rgb), 0.06);
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;

  &:hover,
  &:focus-within {
    border-color: rgba(var(--accent-2-rgb), 0.72);
    background: rgba(var(--accent-2-rgb), 0.12);
  }
}

.livery-preview-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 4px 8px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.14);
  border-radius: 0px;;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.livery-preview-check input[type="checkbox"] {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0;
}

.livery-preview-select select {
  min-height: 24px;
  padding: 2px 24px 2px 8px;
  border-color: rgba(var(--accent-2-rgb), 0.42);
  background-color: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 14px;

  &:focus {
    border-color: rgba(var(--accent-2-rgb), 0.72);
    box-shadow: 0 0 0 2px rgba(var(--accent-2-rgb), 0.16);
  }
}

.livery-preview-body {
  grid-row: 2;
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  min-height: 0;
  overflow: hidden;
}

.livery-preview-workspace.has-splat-legend .livery-preview-body {
  grid-row: 3;
}

.livery-preview-workspace.is-numberplate-panel-open .livery-preview-body {
  margin-right: var(--numberplate-panel-width);
}

.livery-preview-workspace.is-numberplate-dev-panel-open .livery-preview-body {
  margin-right: var(--numberplate-dev-panel-width);
}

.livery-preview-workspace.is-scene-settings-panel-open .livery-preview-body {
  margin-right: var(--scene-settings-panel-width);
}

.livery-preview-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
}

.livery-preview-workspace.is-material-inspector-open .livery-preview-stage {
  grid-template-columns: minmax(0, 1fr) minmax(420px, 490px);
}

.livery-preview-workspace.is-material-finish-open .livery-preview-stage {
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
}

.livery-preview-workspace.is-wheel-diagnostics-open .livery-preview-stage {
  grid-template-columns: minmax(0, 1fr) minmax(440px, 520px);
}

.livery-preview-canvas-wrap {
  position: relative;
  height: auto;
  min-height: 0;
  overflow: hidden;
  background: #101113;
}

.livery-preview-canvas-wrap canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.livery-preview-canvas-wrap span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  pointer-events: none;
}

.livery-preview-material-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  border-left: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 10, 0.98);
}

.livery-preview-material-panel[hidden] {
  display: none;
}

.livery-preview-material-finish-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  border-left: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 10, 0.98);
}

.livery-preview-material-finish-panel[hidden] {
  display: none;
}

.livery-preview-wheel-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  border-left: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(5, 7, 10, 0.98);
}

.livery-preview-wheel-panel[hidden] {
  display: none;
}

.livery-preview-wheel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);

  strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 17px;
    text-transform: uppercase;
  }

  span {
    grid-column: 1 / -1;
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  button {
    min-height: 30px;
    padding: 5px 9px;
    border-color: rgba(255, 255, 255, 0.16);
    font-size: 13px;
  }
}

.livery-preview-wheel-unsaved {
  color: #ffca52 !important;
  font-weight: 800;
  text-transform: uppercase;
}

.livery-preview-wheel-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) repeat(3, auto);
  gap: 6px;
  align-items: end;

  label {
    display: grid;
    gap: 4px;
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
  }

  select {
    min-height: 30px;
    border-color: rgba(255, 255, 255, 0.16);
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 13px;
  }

  button {
    min-width: 0;
    white-space: nowrap;
  }
}

.livery-preview-wheel-content {
  display: grid;
  align-content: start;
  gap: 13px;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
  overflow-wrap: anywhere;
  word-break: break-word;

  p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.35;
  }
}

.livery-preview-wheel-section {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.1);

  &:last-child {
    border-bottom: 0;
  }

  &.is-warning {
    padding: 10px;
    border: var(--border-width) solid rgba(247, 201, 72, 0.28);
    background: rgba(247, 201, 72, 0.06);
  }

  h3 {
    margin: 0;
    color: #fff;
    font-family: var(--font-display);
    font-size: 15px;
    text-transform: uppercase;
  }
}

.livery-preview-wheel-stats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;

  div {
    display: grid;
    gap: 2px;
    padding: 7px 8px;
    border: var(--border-width) solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
  }

  span {
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
  }

  strong {
    min-width: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.livery-preview-wheel-table-wrap {
  max-width: 100%;
  overflow: auto;
}

.livery-preview-wheel-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 13px;

  th,
  td {
    padding: 6px 7px;
    border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.72);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  th {
    color: rgba(255, 255, 255, 0.48);
    font-size: 12px;
    text-transform: uppercase;
  }

  td:first-child {
    color: #fff;
    font-weight: 700;
  }
}

.livery-preview-material-head {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);

  strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 17px;
    text-transform: uppercase;
  }

  span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 14px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.livery-preview-material-head input[type="search"] {
  width: 100%;
  min-height: 32px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.livery-preview-material-finish-head {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);

  strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 17px;
    text-transform: uppercase;
  }

  span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
  }
}

.livery-preview-material-finish-content {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 0;
  overflow: auto;
  padding: 14px;

  label {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 7px 10px;
    align-items: center;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
  }

  label span {
    justify-self: end;
    color: rgba(255, 255, 255, 0.54);
    font-variant-numeric: tabular-nums;
  }

  input[type="range"] {
    grid-column: 1 / -1;
    width: 100%;
  }

  input[type="number"] {
    grid-column: 1 / -1;
    min-height: 32px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
  }
}

.livery-preview-material-finish-presets,
.livery-preview-material-finish-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;

  button {
    min-height: 31px;
    border-color: rgba(255, 255, 255, 0.16);
  }
}

.livery-preview-material-finish-actions {
  flex-direction: column;
  padding-top: 4px;

  button {
    width: 100%;
  }
}

.livery-preview-material-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;

  button {
    min-height: 27px;
    padding: 4px 8px;
    border-color: rgba(255, 255, 255, 0.14);
    font-size: 13px;
  }

  button.active {
    border-color: rgba(var(--accent-2-rgb), 0.72);
    background: rgba(var(--accent-2-rgb), 0.2);
    color: #fff;
  }
}

.livery-preview-material-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.livery-preview-material-check input {
  width: 14px;
  min-width: 14px;
  height: 14px;
  min-height: 14px;
  margin: 0;
}

.livery-preview-material-content {
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 16px;
  overflow-wrap: anywhere;
  word-break: break-word;

  p {
    margin: 0;
    color: rgba(255, 255, 255, 0.66);
    font-size: 14px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.livery-preview-material-card {
  display: grid;
  gap: 8px;
  padding: 10px 0;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.1);

  &:last-child {
    border-bottom: 0;
  }
}

.livery-preview-material-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  text-transform: uppercase;

  span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  small {
    color: rgba(255, 255, 255, 0.52);
    font-family: var(--font-body);
    font-size: 13px;
    text-transform: none;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.livery-preview-material-card dl {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 5px 9px;
  margin: 0;
  font-size: 14px;

  dt {
    color: rgba(255, 255, 255, 0.48);
    text-transform: uppercase;
  }

  dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
    color: rgba(255, 255, 255, 0.76);
  }
}

.livery-preview-material-subhead {
  margin-top: 9px;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

.livery-preview-material-list {
  display: grid;
  gap: 5px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.livery-preview-material-list li {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 6px 7px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.08);
  border-radius: 0px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.livery-preview-material-list strong {
  color: #fff;
  font-size: 13px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.livery-preview-material-list span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.livery-preview-material-channel {
  color: #ff5963;
  font-weight: 700;
}

.livery-preview-material-analysis {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 11px;
  border: var(--border-width) solid rgba(var(--accent-2-rgb), 0.24);
  border-radius: 0px;;
  background: rgba(var(--accent-2-rgb), 0.06);
}

.livery-preview-material-analysis-head {
  display: grid;
  gap: 3px;

  strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 16px;
    text-transform: uppercase;
  }

  span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.livery-preview-material-analysis-channel {
  display: grid;
  gap: 5px;
  padding-top: 9px;
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.1);

  h3 {
    margin: 0;
    color: #fff;
    font-family: var(--font-display);
    font-size: 14px;
    text-transform: uppercase;
  }
}

.livery-preview-bottombar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 7px 14px;
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.86);
}

.livery-preview-bottombar .livery-preview-camera-presets {
  flex: 0 0 auto;
  margin-left: auto;
  justify-content: flex-end;
}

.livery-preview-numberplate-panel,
.livery-preview-numberplate-dev-panel {
  position: absolute;
  top: 54px;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 12px;
  width: var(--numberplate-panel-width);
  max-width: var(--numberplate-panel-width);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  border-left: var(--border-width) solid rgba(var(--accent-2-rgb), 0.52);
  background: rgba(0, 0, 0, 0.94);
  box-shadow: -10px 0 32px rgba(0, 0, 0, 0.35);
}

.livery-preview-numberplate-dev-panel {
  width: var(--numberplate-dev-panel-width);
  max-width: var(--numberplate-dev-panel-width);
}

.livery-preview-numberplate-panel[hidden],
.livery-preview-numberplate-dev-panel[hidden] {
  display: none;
}

.livery-preview-numberplate-dev-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding-bottom: 12px;
  border-bottom: var(--border-width) solid rgba(255, 255, 255, 0.12);

  div {
    display: grid;
    gap: 3px;
    min-width: 0;
  }

  strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 18px;
    text-transform: uppercase;
  }

  span {
    color: rgba(255, 255, 255, 0.62);
    font-size: 13px;
    line-height: 1.35;
  }
}

.livery-preview-numberplate-dev-column,
.livery-preview-numberplate-main-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
}

.livery-preview-numberplate-dev-column[hidden] {
  display: none;
}

.livery-preview-numberplate-fields {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 10px;
  min-width: 0;

  strong {
    grid-column: 1 / -1;
    color: #fff;
    font-family: var(--font-display);
    font-size: 17px;
    text-transform: uppercase;
  }
}

.livery-preview-numberplate-hint {
  grid-column: 1 / -1;
  margin: -4px 0 2px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  line-height: 1.35;
}

.livery-preview-numberplate-panel label,
.livery-preview-numberplate-dev-panel label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  text-transform: uppercase;

  input,
  select {
    min-width: 0;
    width: 100%;
  }

  select {
    border-color: rgba(var(--accent-2-rgb), 0.42);
    background-color: rgba(0, 0, 0, 0.3);

    &:focus {
      border-color: rgba(var(--accent-2-rgb), 0.72);
      box-shadow: 0 0 0 2px rgba(var(--accent-2-rgb), 0.16);
    }
  }
}

.livery-preview-numberplate-fields > label {
  max-width: none;
}

.livery-preview-numberplate-info-slot {
  display: grid;
  min-width: 0;
}

.livery-preview-numberplate-selected {
  display: grid;
  grid-column: 1 / -1;
  gap: 3px;
  min-width: 0;
  padding: 8px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);

  span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 12px;
    text-transform: uppercase;
  }

  strong {
    overflow: hidden;
    color: #fff;
    font-family: var(--font-body);
    font-size: 14px;
    text-overflow: ellipsis;
    text-transform: none;
    white-space: nowrap;
  }
}

.livery-preview-numberplate-status {
  grid-column: 1 / -1;
  align-self: end;
  justify-self: stretch;
  min-height: 34px;
  padding: 8px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.25;
  text-transform: uppercase;

  &.is-dirty {
    border-color: rgba(255, 193, 7, 0.58);
    color: #ffe08a;
  }

  &.needs-apply {
    border-color: rgba(var(--accent-rgb), 0.58);
    color: rgb(var(--accent-rgb));
  }

  &.is-applied {
    border-color: rgba(22, 163, 74, 0.58);
    color: #86efac;
  }
}

.livery-preview-numberplate-tools {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;

  button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
    width: 100%;
    padding-right: 8px;
    padding-left: 8px;
    border-color: rgba(255, 255, 255, 0.14);

    &.active {
      border-color: rgba(var(--accent-2-rgb), 0.78);
      background: rgba(var(--accent-2-rgb), 0.22);
      color: #fff;
    }
  }

  .tool-icon {
    display: inline-grid;
    place-items: center;
    width: 18px;
    min-width: 18px;
    height: 18px;
    font-size: 15px;
    line-height: 1;

    svg {
      width: 18px;
      height: 18px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
  }
}

.livery-preview-numberplate-text-control {
  max-width: 110px;
}

.livery-preview-numberplate-grid {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  min-width: 0;
}

.livery-preview-numberplate-fit .livery-preview-numberplate-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.livery-preview-numberplate-panel .livery-preview-numberplate-check,
.livery-preview-numberplate-dev-panel .livery-preview-numberplate-check {
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 8px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.045);

  input {
    width: auto;
    min-width: 18px;
    height: 18px;
    margin: 0;
  }
}

.livery-preview-numberplate-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;

  button {
    width: 100%;
    justify-content: center;
  }

  .numberplate-action-spaced {
    margin-top: 12px;
  }
}

.livery-preview-numberplate-actions-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));

  button {
    min-height: 34px;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 12px;
    line-height: 1.15;
    white-space: normal;
  }
}

.livery-preview-numberplate-advanced {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.12);

  summary {
    cursor: pointer;
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    text-transform: uppercase;
  }

  .livery-preview-numberplate-actions {
    margin-top: 8px;
  }
}

.livery-preview-numberplate-diagnostics {
  display: grid;
  min-width: 0;
  align-items: start;
  gap: 8px;
  padding-top: 10px;
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.12);

  strong {
    color: #fff;
    font-size: 14px;
  }

  pre {
    max-height: 180px;
    padding: 9px;
    overflow: auto;
    border: var(--border-width) solid rgba(255, 255, 255, 0.12);
    border-radius: 0px;
    background: rgba(0, 0, 0, 0.26);
    color: rgba(255, 255, 255, 0.72);
    font-size: 13px;
    line-height: 1.35;
    white-space: pre-wrap;
  }
}

.livery-preview-numberplate-panel p,
.livery-preview-numberplate-dev-panel p {
  margin: 0;
  min-height: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.35;
}

.livery-preview-scene-settings-panel {
  position: absolute;
  top: 54px;
  right: 0;
  bottom: 0;
  z-index: 6;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  align-content: start;
  gap: 12px;
  width: var(--scene-settings-panel-width);
  max-width: var(--scene-settings-panel-width);
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  border-left: var(--border-width) solid rgba(var(--accent-2-rgb), 0.52);
  background: rgba(0, 0, 0, 0.94);
  box-shadow: -10px 0 32px rgba(0, 0, 0, 0.35);
}

.livery-preview-scene-settings-panel[hidden] {
  display: none;
}

.livery-preview-scene-settings-head {
  display: grid;
  gap: 4px;

  strong {
    color: #fff;
    font-family: var(--font-display);
    font-size: 17px;
    text-transform: uppercase;
  }

  span {
    color: rgba(255, 255, 255, 0.58);
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

.livery-preview-scene-settings-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.livery-preview-scene-settings-subhead {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-family: var(--font-display);
  font-size: 15px;
  text-transform: uppercase;
}

.livery-preview-scene-settings-fields label {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  text-transform: uppercase;

  &:first-child {
    grid-column: 1 / -1;
  }

  input,
  select {
    min-width: 0;
    width: 100%;
  }

  input[type="color"] {
    height: 34px;
    padding: 2px;
    border-color: rgba(var(--accent-2-rgb), 0.42);
    background: rgba(0, 0, 0, 0.3);
  }

  select,
  input[type="number"] {
    min-height: 34px;
    border-color: rgba(var(--accent-2-rgb), 0.42);
    background-color: rgba(0, 0, 0, 0.3);
    color: #fff;
  }
}

.livery-preview-scene-settings-check {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  align-content: center;
  min-height: 58px;
  padding: 8px 9px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);

  input[type="checkbox"] {
    width: 15px;
    min-width: 15px;
    height: 15px;
    min-height: 15px;
    margin: 0;
  }
}

.livery-preview-scene-settings-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;

  button {
    width: 100%;
    justify-content: center;
  }
}

.livery-preview-scene-settings-panel p {
  margin: 0;
  min-height: 0;
  overflow: auto;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.68);
  font-size: 14px;
  line-height: 1.35;
}

.livery-preview-status-wrap {
  min-height: 0;
  border-top: var(--border-width) solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.livery-preview-status-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 14px;
  gap: 12px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  text-transform: uppercase;
}

.livery-preview-status-head button {
  min-height: 24px;
  padding: 0 9px;
  border: var(--border-width) solid rgba(255, 255, 255, 0.18);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  font-size: 12px;
  text-transform: none;

  &:hover,
  &:focus-visible {
    border-color: rgba(var(--accent-2-rgb), 0.72);
    background: rgba(var(--accent-2-rgb), 0.14);
    color: #fff;
  }
}

.livery-preview-status {
  min-height: 58px;
  max-height: 120px;
  overflow: auto;
  padding: 10px 14px;
  white-space: pre-wrap;
  color: rgba(255, 255, 255, 0.76);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.4;
}

.livery-preview-status-wrap.is-collapsed .livery-preview-status {
  display: none;
}
