/* V1 hinged gate perspective, definitive command lamps and animated maintenance restraints. */

/* Each half remains on its outside hinge and swings away toward the vehicle. */
.gate-bay{
  perspective:115px;
  perspective-origin:50% -30px;
  transform-style:preserve-3d;
}
.gate-leaf{
  transform:perspective(115px) rotateY(0deg);
  backface-visibility:hidden;
  transition:transform 2.05s cubic-bezier(.28,.02,.18,1),filter 2.05s ease,box-shadow 2.05s ease;
}
.gate-leaf-left{transform-origin:left center}
.gate-leaf-right{transform-origin:right center}
.air-gates.open .gate-leaf{transition-duration:1.9s}
.air-gates.open .gate-leaf-left{
  transform:perspective(115px) rotateY(78deg);
  filter:brightness(.82);
  box-shadow:inset 0 0 0 1px #e8f1f1,3px 2px 5px rgba(28,48,53,.24);
}
.air-gates.open .gate-leaf-right{
  transform:perspective(115px) rotateY(-78deg);
  filter:brightness(.82);
  box-shadow:inset 0 0 0 1px #e8f1f1,-3px 2px 5px rgba(28,48,53,.24);
}
.air-gates.gate-failed-mid .gate-leaf-left{transform:perspective(115px) rotateY(42deg)!important}
.air-gates.gate-failed-mid .gate-leaf-right{transform:perspective(115px) rotateY(-42deg)!important}
.air-gates.gate-obstructed .gate-leaf-left{transform:perspective(115px) rotateY(34deg)!important}
.air-gates.gate-obstructed .gate-leaf-right{transform:perspective(115px) rotateY(-34deg)!important}

/* Achieved position = solid; the other available command = unmistakable flash. */
.real-button.gate.gate-position-active>i:not(.progress){
  animation:none!important;
  opacity:1!important;
  background:#63e18c!important;
  box-shadow:inset 0 0 0 1px #b5ffca,0 0 10px rgba(99,225,140,.9)!important;
}
.real-button.gate.gate-command-ready>i:not(.progress){
  animation:gateCommandAvailableV51 .82s steps(1,end) infinite!important;
}
@keyframes gateCommandAvailableV51{
  0%,48%{opacity:1;background:#63e18c;box-shadow:inset 0 0 0 1px #b5ffca,0 0 10px rgba(99,225,140,.9)}
  49%,100%{opacity:.42;background:#263a32;box-shadow:inset 0 0 0 1px #3f5c4a,0 0 1px rgba(99,225,140,.18)}
}

.block-local-controls .block-restraint-control.animating{
  border-color:#e5b64c;
  color:#ffe4a2;
  box-shadow:inset 0 0 0 1px rgba(229,182,76,.24),0 0 8px rgba(229,182,76,.24);
}

@media(prefers-reduced-motion:reduce){
  .real-button.gate.gate-command-ready>i:not(.progress){animation:gateCommandAvailableV51 1.4s steps(1,end) infinite!important}
}
