/* Defines the position and dimensions of the leafContainer div */
.wed_fixed_bcg #leafContainer {
  width: 100%;
  height: 100vh;
  position: fixed;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
.wed_white_fixed #leafContainer {
  width: 100%;
  height: 100vh;
  position: fixed;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
}
#leafContainer 
{
  width: 100%;
  height: 100vh;
  position: fixed;
  overflow: hidden;
  pointer-events: none !important;
  z-index: 10;
}
.wed_slider_dandelions #leafContainer {
  width: 100%;
  height: 100vh;
  position: absolute;
  overflow: hidden;
  pointer-events: none !important;
  z-index: 10;
}

/* This CSS rule is applied to all div elements in the leafContainer div.
   It styles and animates each leafDiv.
*/
#leafContainer > div 
{
    position: absolute;
    width: 45px;
    height: 45px;
    pointer-events: none !important;

    
    /* We use the following properties to apply the fade and drop animations to each leaf.
       Each of these properties takes two values. These values respectively match a setting
       for fade and drop.
    */
    -webkit-animation-iteration-count: infinite, infinite;
    -webkit-animation-direction: normal, normal;
    -webkit-animation-timing-function: linear, ease-in;
    animation-iteration-count: infinite, infinite;
    animation-direction: normal, normal;
    animation-timing-function: linear, ease-in;
}

/* This CSS rule is applied to all img elements directly inside div elements which are
   directly inside the leafContainer div. In other words, it matches the 'img' elements
   inside the leafDivs which are created in the createALeaf() function.
*/
#leafContainer > div > img {
     position: absolute;
     width: auto;
     height: 65px;


    /* We use the following properties to adjust the clockwiseSpin or counterclockwiseSpinAndFlip
       animations on each leaf.
       The createALeaf function in the Leaves.js file determines whether a leaf has the 
       clockwiseSpin or counterclockwiseSpinAndFlip animation.
    */
     -webkit-animation-iteration-count: infinite;
     -webkit-animation-direction: alternate;
     -webkit-animation-timing-function: linear;
     -webkit-transform-origin: 50% -100%;
     animation-iteration-count: infinite;
     animation-direction: alternate;
     animation-timing-function: linear;
     transform-origin: 50% -100%;
}

.wed_floral #leafContainer > div > img {
     position: absolute;
     width: auto;
     height: 25px;
}

/* Hides a leaf towards the very end of the animation */
@-webkit-keyframes fade
{
    /* Show a leaf while into or below 95 percent of the animation and hide it, otherwise */
    0%   { opacity: 1; }
    85%  { opacity: 1; }
    90% { opacity: 0; }
}

@keyframes fade
{
    0%   { opacity: 1; }
    85%  { opacity: 1; }
    90% { opacity: 0; }
}

/* Makes a leaf fall/float from bottom to top */
@-webkit-keyframes drop
{
    0%   { -webkit-transform: translate(0px, 50px); }
    100% { -webkit-transform: translate(0px, -1950px); }
}

@keyframes drop
{
    0%   { transform: translate(0px, 50px); -webkit-transform: translate(0px, 50px); }
    100% { transform: translate(0px, -1950px); -webkit-transform: translate(0px, -1950px); }
}

/* Rotates a leaf from -50 to 50 degrees in 2D space */
@-webkit-keyframes clockwiseSpin
{
    0%   { -webkit-transform: rotate(-50deg); }
    60% { -webkit-transform: rotate(50deg); }
    80% { -webkit-transform: rotate(80deg); }
   100% { -webkit-transform: rotate(-40deg); }
}

@keyframes clockwiseSpin
{
    0%   { transform: rotate(-50deg); }
    60% { transform: rotate(50deg); }
    80% { transform: rotate(80deg); }
   100% { transform: rotate(-40deg); }
}

/* Flips a leaf and rotates it from 50 to -50 degrees in 2D space */
@-webkit-keyframes counterclockwiseSpinAndFlip 
{
    0%   { -webkit-transform: scale(-1, 1) rotate(80deg); }
    100% { -webkit-transform: scale(-1, 1) rotate(-80deg); }
}

@keyframes counterclockwiseSpinAndFlip 
{
    0%   { transform: scale(-1, 1) rotate(80deg); }
    100% { transform: scale(-1, 1) rotate(-80deg); }
}
