/* Compact numeric scrub controls used by tuning property rows. */

body.is-property-scrubbing,
body.is-property-scrubbing * {
  cursor: none !important;
}

.ae-prop-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-height: 25px;
  border: 1px solid rgba(51, 56, 70, 0.72);
  border-radius: 4px;
  background: #14171e;
  padding: 3px 4px;
}

.ae-prop-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  min-width: 0;
  width: 44px;
  color: #aeb6c7;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  word-break: keep-all;
}

.ae-prop-label-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ae-prop-values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  justify-content: stretch;
  gap: 3px;
  min-width: 0;
}

.ae-prop-values.is-two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ae-prop-row:not(.has-link-toggle) .ae-prop-label {
  padding-right: 1px;
}

.ae-prop-row.has-rotation-field .ae-prop-values.is-two-up {
  grid-template-columns: minmax(0, 1fr) 24px;
}

.scrub-control {
  display: inline-grid;
  position: relative;
  grid-template-columns: minmax(0, 1fr) 0;
  align-items: stretch;
  min-width: 0;
  max-width: 100%;
  transition: grid-template-columns 120ms ease;
}

.scrub-control.is-rotation {
  min-width: 0;
}

.scrub-control.is-toggle {
  grid-template-columns: minmax(0, 1fr);
}

.scrub-control:hover,
.scrub-control:focus-within,
.scrub-control:has(.scrub-value.is-scrubbing) {
  grid-template-columns: minmax(0, 1fr) 16px;
}

.scrub-control.is-toggle:hover,
.scrub-control.is-toggle:focus-within {
  grid-template-columns: minmax(0, 1fr);
}

.scrub-value {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  align-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 21px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #f5f7fb;
  padding: 2px 4px;
  cursor: ns-resize;
  line-height: 1;
  user-select: none;
  overflow: hidden;
}

.scrub-value.has-no-label {
  grid-template-columns: minmax(0, 1fr);
}

.scrub-value[data-scrub-prop='opacity'] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  cursor: pointer;
  justify-content: center;
  width: 24px;
  min-width: 0;
  padding: 2px;
  background: #11141b;
  color: #858d9d;
}

.scrub-value[data-scrub-prop='opacity'] svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.scrub-value span {
  color: #7cc3a2;
  font-size: 9px;
  font-weight: 800;
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.scrub-value strong {
  min-width: 0;
  color: #55b7ff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: clip;
}

.scrub-value[data-scrub-prop='rot'] strong {
  min-width: 0;
  font-size: 9.5px;
}

.scrub-value:hover,
.scrub-value.is-scrubbing {
  border-color: rgba(124, 195, 162, 0.45);
  background: rgba(124, 195, 162, 0.08);
}

.scrub-value.is-scrubbing {
  box-shadow: 0 0 0 2px rgba(124, 195, 162, 0.18);
}

.scrub-value.is-off strong {
  color: #8f97a8;
}

.scrub-value[data-scrub-prop='opacity'].is-off {
  border-color: rgba(124, 195, 162, 0.35);
  background: #20342c;
  color: #dff7eb;
}

.scrub-value[data-scrub-prop='opacity'].is-off svg {
  color: #7cc3a2;
}

.scrub-value.is-editing {
  min-width: 72px;
  padding: 0;
  cursor: text;
}

.scrub-stepper-buttons {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  width: 16px;
  min-width: 0;
  height: 100%;
  min-height: 21px;
  overflow: hidden;
  border: 1px solid rgba(58, 64, 80, 0.88);
  border-radius: 3px;
  background: #0f1219;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0);
  transition:
    opacity 120ms ease,
    transform 120ms ease;
}

.scrub-control:hover .scrub-stepper-buttons,
.scrub-control:focus-within .scrub-stepper-buttons,
.scrub-control.is-scrubbing .scrub-stepper-buttons,
.scrub-value.is-scrubbing + .scrub-stepper-buttons {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.scrub-stepper-buttons button {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  border: 0;
  background: transparent;
  color: #cdd4e4;
  font-size: 8px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.scrub-stepper-buttons button:hover {
  color: #7cc3a2;
}

.scrub-input {
  width: 72px;
  height: 100%;
  min-height: 25px;
  border: 0;
  background: #0f1219;
  color: #f5f7fb;
  padding: 2px 6px;
  font: inherit;
  font-size: 12px;
  font-weight: 750;
  text-align: right;
  outline: none;
}

.scrub-link-toggle {
  display: grid;
  flex: 0 0 16px;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid #343a49;
  border-radius: 999px;
  background: #0f1219;
  color: #798295;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.scrub-link-toggle.is-active {
  border-color: rgba(124, 195, 162, 0.5);
  background: rgba(124, 195, 162, 0.12);
  color: #7cc3a2;
}

.scrub-link-toggle:hover {
  border-color: #7cc3a2;
  color: #dff7eb;
}
