/* Timeline and compact toolbar controls for the tuning panel. */

.timeline-settings {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  gap: 5px;
  align-items: center;
  justify-content: start;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
}

.setting-section[data-section='action'] .timeline-settings {
  grid-template-columns: 54px repeat(8, minmax(0, 30px));
}

.setting-section[data-section='effect'] .timeline-settings {
  grid-template-columns: 54px repeat(3, minmax(0, 30px));
}

.timeline-settings > * {
  min-width: 0;
  box-sizing: border-box;
}

.timeline-settings .control-more-menu,
.timeline-settings .icon-button {
  width: 30px;
  max-width: 30px;
}

.setting-section[data-section='action'] .timeline-settings .number-stepper-control {
  width: 54px;
  min-width: 54px;
}

.timeline-frame-input {
  position: relative;
  display: block;
  width: 54px;
}

.timeline-frame-input input {
  height: 30px;
  padding: 0 17px 0 6px;
  font-size: 16px;
  font-weight: 800;
}

.timeline-speed-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px;
  gap: 5px;
  align-items: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: hidden;
}

.timeline-speed-control input {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.timeline-speed-control input[type='range'] {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.timeline-speed-control input[type='number'] {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  height: 30px;
  padding: 0 5px;
  border: 1px solid rgba(51, 56, 70, 0.9);
  border-radius: 4px;
  background: #11141b;
  color: #55b7ff;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  text-align: right;
}

.timeline-frame-steppers {
  position: absolute;
  top: 1px;
  right: 1px;
  display: grid;
  width: 13px;
  height: 28px;
  overflow: hidden;
  border-left: 1px solid #353b49;
}

.timeline-frame-steppers 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;
}

.timeline-frame-steppers button:hover {
  color: #7cc3a2;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid #525767;
  border-radius: 6px;
  background: #292c37;
  color: #f8f8fb;
  cursor: pointer;
  padding: 0;
}

.icon-button:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.icon-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#actionTriggerRepeat svg {
  width: 18px;
  height: 18px;
}

.action-blend-button {
  position: relative;
}

.action-blend-badge {
  position: absolute;
  right: 1px;
  bottom: 0;
  min-width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--panel-bg, #10151d);
  color: currentColor;
  font-size: 9px;
  font-weight: 800;
  line-height: 12px;
  text-align: center;
  pointer-events: none;
}

#actionPlayback svg path,
#effectPlayback svg path {
  fill: currentColor;
  stroke: none;
}

.icon-button.is-active {
  border-color: #7cc3a2;
  color: #7cc3a2;
}

.timeline-view {
  display: block;
}

.timeline-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  height: 32px;
  border: 1px solid #3f4553;
  border-radius: 6px;
  background: #141720;
  overflow: hidden;
}

.timeline-slot {
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.timeline-slot:last-child {
  border-right: 0;
}

.timeline-slot.is-active {
  background: rgba(124, 195, 162, 0.14);
  box-shadow: inset 0 0 0 1px rgba(124, 195, 162, 0.38);
}

.timeline-keyframe {
  position: absolute;
  top: 0;
  height: 100%;
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 0;
  background: #263141;
  color: #eef2fb;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transform: none;
  cursor: pointer;
  padding: 0;
}

.timeline-keyframe svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.timeline-keyframe[data-fixed='true'] {
  cursor: pointer;
  background: #202632;
  color: #d9deec;
}

.timeline-keyframe.is-active {
  background: #214b3c;
  color: #7cc3a2;
}
