/* web/hud/world_fade.css
   The side panels, the bar, the header's buttons for the world and the input line,
   fading in before the room decodes in and out as it decodes away
   (web/hud/world_fade.js), in the Stage's time (web/hud/stage.css); the columns take
   the time they take to tuck away (web/play-panels.css), and the input line comes back
   with the title card, in its time (web/play.html). Unseen, nothing can be pressed. */

/* Entering, nothing of the world is placed while the input line fades out: no column,
   no bar, and no room kept for either, so the line keeps the title card's width. The
   Stage opening at once narrows the window in its own time, as it always does. */
:root[data-world-fade="entering"] #centre:not(.tucking) {
  padding-left: 0 !important; padding-right: 0 !important;
}
:root[data-world-fade="entering"] :is(#centre .rail, #centre .railgrip) { display: none; }
:root[data-world-fade="entering"] #hud { display: none !important; }
:root[data-world-fade="entering"] #prompt {
  transition: opacity var(--stage-ms) var(--stage-ease);
}

:root[data-world-fade="in"] #centre .rail .dkpanel,
:root[data-world-fade="out"] #centre .rail .dkpanel {
  transition: opacity var(--stage-ms) var(--stage-ease), transform var(--stage-ms) var(--stage-ease);
}
:root[data-world-fade="in"] :is(#hud, #prompt, #colbtn-left, #colbtn-right, #panels, #storybtn, #armorybtn, #reportbtn),
:root[data-world-fade="out"] :is(#hud, #prompt, #colbtn-left, #colbtn-right, #panels, #storybtn, #armorybtn, #reportbtn) {
  transition: opacity var(--stage-ms) var(--stage-ease);
}
:root[data-world-fade="back"] #prompt {
  transition: opacity var(--title-ms) ease var(--title-wait);
}

:root:is([data-world-fade="entering"], [data-world-fade="hidden"], [data-world-fade="out"]) :is(
  #centre .rail, #centre .railgrip, #centre .rail .dkpanel, #hud, #prompt,
  #colbtn-left, #colbtn-right, #panels, #storybtn, #armorybtn, #reportbtn) {
  opacity: 0; pointer-events: none;
}
:root[data-world-fade="hidden"] #centre .rail .dkpanel,
:root[data-world-fade="out"] #centre .rail .dkpanel {
  transform: translateY(6px);
}
:root[data-world-fade="hidden"] :is(#centre .rail, #centre .railgrip,
  #centre .rail .dkpanel, #hud, #prompt, #colbtn-left, #colbtn-right, #panels, #storybtn, #armorybtn, #reportbtn) {
  transition: none;
}
