/* Cubes, holes, brackets and argument outlines.  Shared by the game
   (index.html) and the palette editor (palette.html); colours come from
   CSS variables that palette.js sets. */
/* A cube: front face plus four side faces, shaded by brightness. */
.cube { position: absolute; left: 0; width: var(--cell); height: var(--cell); transform-style: preserve-3d; }
.cube > i { position: absolute; width: var(--cell); height: var(--cell); background: var(--c);
            border: 1px solid rgba(0,0,0,.35); }
.cube > .f { transform: translateZ(var(--half)); display: flex; align-items: center; justify-content: center;
             font-style: normal; font-weight: 700; font-size: calc(var(--cell) * .5); color: var(--fg); line-height: 1; }
.cube > .l { left: 0; top: 0; transform-origin: 0 50%; transform: translateZ(var(--half)) rotateY(90deg); filter: brightness(var(--shade-l, .62)); }
.cube > .r { right: 0; top: 0; transform-origin: 100% 50%; transform: translateZ(var(--half)) rotateY(-90deg); filter: brightness(var(--shade-r, .78)); }
.cube > .t { left: 0; top: 0; transform-origin: 50% 0; transform: translateZ(var(--half)) rotateX(-90deg); filter: brightness(var(--shade-t, 1.25)); }
.cube > .b { left: 0; bottom: 0; transform-origin: 50% 100%; transform: translateZ(var(--half)) rotateX(90deg); filter: brightness(var(--shade-b, .5)); }
.cube.flash > i { filter: brightness(1.7); }
/* the items the falling bird will take as arguments, by their fate:
   white = duplicated, black = deleted, blue = used once (kept, perhaps moved) */
.cube.hit > i { border: 4px solid var(--hc); }
.cube.hit > .f { box-shadow: inset 0 0 0 1px rgba(0,0,0,.35); }
.brk.hit > b { border-width: 5px; border-color: var(--hc); }
.hit.dup { --hc: var(--dup, #fff); } .hit.del { --hc: var(--del, #000); } .hit.act { --hc: var(--act, #2f7bff); }
.cube.trail { opacity: .18; }
/* stone: a junk gap, solid until nothing is on top of it.  Drawn
   INVISIBLE for now (a trial): it still holds up what is above it.
   Delete the visibility line to see it again. */
.cube.stone { visibility: hidden; }
.cube.stone > i { background: var(--stone, #3c3c3c);
  background-image: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 3px, transparent 3px 7px); }
/* fill play: a fed row pushes the board up from below */
#board.rise .col > .cube, #board.rise .col > .brk { animation: rise .26s ease-out; }
@keyframes rise { from { translate: 0 var(--cell); } to { translate: 0 0; } }
/* fill play: a full row flashes white and shrinks away */
.cube.clearing { animation: clearing .5s ease-in forwards; }
@keyframes clearing { 0%, 45% { filter: brightness(2.6); transform: scale(1); }
                      100% { filter: brightness(3); transform: scale(.1); opacity: 0; } }
/* holes and the landing ghost: wireframe cubes */
.cube.wire > i { background: color-mix(in srgb, var(--green) 10%, transparent); border: 2px dashed var(--green); filter: none; }
.cube.wire > .f { color: var(--green); }
.cube.ghost { opacity: .7; }
/* parens: a bracket drawn on the front plane */
.brk { position: absolute; left: 0; width: var(--cell); height: var(--cell); transform-style: preserve-3d; }
/* each layer is the arch at one depth (--z, in cells) and shade (--s); see Palette.extrude */
.brk > b { position: absolute; left: 6%; right: 6%; border: 4px solid var(--brk, #9a9a9a);
           transform: translateZ(calc(var(--cell) * var(--z))); filter: brightness(var(--s)); }
.brk.open > b { top: 50%; bottom: -2px; border-bottom: none; border-radius: 10px 10px 0 0; }
.brk.close > b { top: -2px; bottom: 50%; border-top: none; border-radius: 0 0 10px 10px; }
/* closing brackets at the bottom of a column hang just under the floor */
.brk.close.floor > b { bottom: 74%; border-radius: 0 0 6px 6px; }
/* a back face, for a cube seen from behind (the turning NEXT piece) */
.cube > .k { left: 0; top: 0; transform: translateZ(calc(var(--half) * -1)) rotateY(180deg); filter: brightness(.55); }
