body {
  background: linear-gradient(to right, #666666, #ecedfd);
}

.container, .envelope, .envelope-big, .flip, .flip-big, .letter, .text, .text:before, .text:after {
  position: absolute;
}
.all_container {
	margin-top: 50px;
}
.envelope-outr{ min-height: 290px;}

.envelope-container.envelope-container-big {
  width: 340px;
  height: 222px;
}

.envelope-container {
	position: relative;
	top: 38px;
	margin: auto auto 0;
	height: 92px;
	width: 140px;
	background: #ddd;
	border-radius: 6px;
	box-shadow: 0px 0px 3px #000;
	transform: rotate(-4deg);
	/* z-index: 99; */
}
/*
.envelope {
  border-top: 46px solid transparent;
  border-left: 70px solid #fa565a;
  border-bottom: 46px solid #fa565a;
  border-right: 70px solid #ed4c50;
  border-radius: 6px;
  z-index: 9;
}

.flip {
  top: 0;
  left: 0;
  border-top: 46px solid #c94548;
  border-left: 70px solid transparent;
  border-bottom: 46px solid transparent;
  border-right: 70px solid transparent;
  border-radius: 6px;
  z-index: 6;
}*/

.envelope.envelope-big {
  border-top: 110px solid transparent;
  border-left: 170px solid #eee;
  border-bottom: 110px solid #f8f8f8;
  border-right: 170px solid #fff;
  border-radius: 6px;
  z-index: 9;
}

.envelope {
	border-top: 46px solid transparent;
	border-left: 70px solid #eee;
	border-bottom: 46px solid #f8f8f8;
	border-right: 70px solid #fff;
	border-radius: 6px;
	z-index: 9;
}
.flip.flip-big {
	top: 0;
	left: 0;
	border-top: 110px solid #dfdfe2;
	border-left: 170px solid transparent;
	border-bottom: 110px solid transparent;
	border-right: 170px solid transparent;
	border-radius: 6px;
	z-index: 6;
}
.flip {
	top: 0;
	left: 0;
	border-top: 46px solid #dfdfe2;
	border-left: 70px solid transparent;
	border-bottom: 46px solid transparent;
	border-right: 70px solid transparent;
	border-radius: 6px;
	z-index: 6;
}

.envelope.envelope-big::after {
	content: "";
	background-image: url(img/ztrade-logo.png);
	background-size: 222px;
	position: absolute;
	left: -168px;
	right: 0;
	bottom: -248px;
	z-index: 1;
	width: 340px;
	height: 222px;
	background-repeat: no-repeat;
	background-position: center top;
	transform: rotate(2deg);
}
.envelope::after {
	content: "";
	background-image: url(img/ztrade-logo.png);
	background-size: 112px;
	position: absolute;
	left: -70px;
	right: 0;
	bottom: -40px;
	z-index: 1;
	width: 140px;
	height: 32px;
	background-repeat: no-repeat;
	background-position: center top;
	transform: rotate(2deg);
}

.letter {
  top: 0px;
  left: 33px;
  height: 45px;
  width: 110px;
  border-radius: 6px;
  z-index: 5;
}
/*
.text {
  top: 10px;
  left: 12px;
  height: 6px;
  width: 100px;
  background: #b0b0b0;
}*/



/*Classes to be Added and removed*/
.open {
  animation: flipOpen 0.4s ease-in forwards;
}

.close {
  animation: flipClose 0.4s ease-in forwards;
}

.letterani1 {
  animation: letterani1 0.8s ease-in forwards;
}

.letterOpen {
  top: 15px;
  transition: 0.3s ease-in;
}

.letterClose {
  top: 0px;
  transition: 0.3s ease-in;
}

.letter.letter-big.letterOpen {
	/*height: 210px;
	width: 320px;*/
  height: auto;
	width: auto;
}

@keyframes flipOpen {
  0% {
    transform: rotateX(0deg);
    transform-origin: center top;
  }
  100% {
    transform: rotateX(180deg);
    transform-origin: center top;
  }
}

@keyframes flipOpen {
  0% {
    transform: rotateX(0deg);
    transform-origin: center top;
  }
  100% {
    transform: rotateX(180deg);
    transform-origin: center top;
  }
}

.letter {
	display: none;
}

.letter.letterOpen {
	display: block;
	transform: rotate(4deg);
}

.envelopebx {
	background: green;
	width: 80px;
	height: 40px;
	left: -22px;
	bottom: -30px;
	position: absolute;
	width: 110px;
	height: 45px;
	z-index: 9;
	background: none;
	overflow: hidden;
	-webkit-transition: 0.4s 0.2s;
	-moz-transition: 0.4s 0.2s;
	transition: 0.4s 0.2s;
	transform: rotate(-13deg);
  margin-top: -50px;
}
.envelopebx.envelopebx-big {
	background: green;
	left: 0px;
	bottom: -174px;
	position: absolute;
	width: 290px;
	height: 190px;
	z-index: 9;
	background: none;
	overflow: hidden;
	-webkit-transition: 0.4s 0.2s;
	-moz-transition: 0.4s 0.2s;
	transition: 0.4s 0.2s;
	transform: rotate(-4deg);
}
.envelopebx.envelopebx-finished {
  margin-top: 100px;
  /* margin-left: 90px; */
}
.envelopebx img {
	width: 100%;
	margin:auto;
}


.envelopebx .etext-name {
	color: #fff;
	font-size: 13px;
	z-index: 9;
	position: relative;
	text-align: center;
	font-weight: 600;
}

.envelope-d1 {
  animation: envelopenimatte1 0.8s ease-in forwards;
}
.envelope-d2 {
  animation: envelopenimatte2 0.8s ease-in forwards;
}
.envelope-d3 {
  animation: envelopenimatte3 0.8s ease-in forwards;
}

.envelope-d4 {
  animation: envelopenimatte4 0.8s ease-in forwards;
}

.envelope-d5 {
  animation: envelopenimatte5 0.8s ease-in forwards;
}
.envelope-d6 {
  animation: envelopenimatte6 0.8s ease-in forwards;
}
.envelopebx.ev-6 {
  z-index: 16;
}
.envelopebx.ev-5 {
  z-index: 15;
}
.envelopebx.ev-4 {
  z-index: 14;
}
.envelopebx.ev-3 {
  z-index: 13;
}
.envelopebx.ev-2 {
  z-index: 12;
}
.envelopebx.ev-1 {
  z-index: 11;
}


/*
.letter.letterOpen:after {
  content: "";
  border-top: 46px solid transparent;
  border-left: 70px solid #eee;
  border-bottom: 46px solid #f8f8f8;
  border-right: 70px solid #fff;
  border-radius: 6px;
  z-index: 9;
}
*/

.letter.letterOpen {
  height: auto;
  width: auto;
  z-index: 9 !important;
}
.letter.letterOpen:after {
  content: "";
  border-top: 46px solid transparent;
  border-left: 70px solid #eee;
  border-bottom: 46px solid #f8f8f8;
  border-right: 70px solid #fff;
  border-radius: 6px;
  z-index: 1;
  position: absolute;
  left: -31px;
  transform: rotate(-4deg);
  top: -17px;
  width: 141px;
}
.letter.letterOpen:before {
  content: "";
  background-size: 112px;
  position: absolute;
  left: -30px;
  right: 0;
  bottom: -70px;
  width: 140px;
  height: 32px;
  background-repeat: no-repeat;
  background-position: center top;
  transform: rotate(2deg);
  background-image: url(img/ztrade-logo.png);
  z-index: 9999;
  transform: rotate(0deg);
}

.envelope-container-big .letter.letterOpen:after {
  content: "";
  border-top: 110px solid transparent;
  border-left: 170px solid #eee;
  border-bottom: 110px solid #f8f8f8;
  border-right: 170px solid #fff;
  border-radius: 6px;
  z-index: 999;
  left: -26px;
  top: -25px;
}

.envelope-container-big .letter.letterOpen::before {
  background-size: 222px;
  position: absolute;
  left: -18px;
  bottom: -336px;
  width: 340px;
  height: 222px;
  background-repeat: no-repeat;
  background-position: center top;
  transform: rotate(0deg);
  z-index: 9999;
}


@keyframes envelopenimatte1 {
 0% {
    top: 00px;
    left: 0;
  }
   
  30% {
    top: -80px;
    z-index: 99999;
  }
     
   95% {
    height:140px;
    z-index: 99999;
  }

  100% {
    top: 220px;
    left: -288px;
    z-index: 99999;
    height:140px;
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte2 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
    z-index: 99999;
  }

  95% {
    height:140px;
    z-index: 99999;
  }
       
  100% {
    top: 220px;
    left: -173px;
    z-index: 99999;
    height:140px;
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte3 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
    z-index: 99999;
  }

  95% {
    height:140px;
    z-index: 99999;
  }
       
  100% {
    top: 220px;
    left: -58px;
    height:140px;
    z-index: 99999;
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte4 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
    z-index: 99999;
  }
    
  95% {
    height:140px;
    z-index: 99999;
  }

  100% {
    top: 220px;
    z-index: 99999;
    left: 58px;
    height:140px;
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte5 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
    z-index: 99999;
  }

  95% {
    height:140px;
    z-index: 99999;
  }
       
  100% {
    top: 220px;
    left:173px;
    z-index: 99999;
    height:140px;
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte6 { 
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
    z-index: 99999;
  }

  95% {
    height:140px;
    z-index: 99999;
  }
       
  100% {
    top: 220px;
    left: 288px;
    height:140px;
    z-index: 99999;
    transform: rotate(-0deg);
  }

}

 
button {
  color: #ddd;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  width: 100px;
  text-align: center;
  padding: 10px;
  border-radius: 6px;
  border: none;
  letter-spacing: 1px;
  background: #ed4c50;
}

button:hover {
  cursor: pointer;
}

button:focus {
  outline: none;
  background: #ccc;
  color: #666;
  cursor: not-allowed;
}

#open {
  margin-top: -10px;
  margin-bottom: 8px;
}

#close {
  outline: none;
  background: #ccc;
  color: #ddd;
  cursor: not-allowed;
}

#open:focus ~ #close {
  cursor: pointer;
  background: #ed4c50;
}


.video-container {
  max-width: 600px;
  margin: auto;
  height: 0;
  overflow: hidden;
  transition: 0.3s ease-in;
}
.video-container video {
	width: 100%;
	height: 300px;
}

.video-container.video-show {
  height: 300px;
}

@media only screen and (max-width: 767px) {
  .envelope-outr {
    min-height: 500px;
  }
  .envelopebx.envelopebx-finished{ margin-top: 0;}


  .letter.letter-big.letterOpen {
    /* height: 210px; */
    /* width: 320px; */
    height: 100px;
    width: auto;
    top: 24px;
    left: 29px;
  }

 .letter.letterOpen::before {
    bottom: -7px;
    background-size: 100px;
}


  .letter.letterOpen:after {
    z-index: 1;
    position: absolute;
    left: -31px;
    transform: rotate(-4deg);
    top: -20px;
    width: 141px;
  }

 
  .envelopebx .text {
    
  }

  

  .envelopebx .text .etext-name {
    animation: etextshow 0.8s ease-in forwards;
  }

  .envelopebx .text {
    animation: textflex 0.8s ease-in forwards;
  }


  .letter.letter-big.letterOpen {
    /* height: 210px; */
    /* width: 320px; */
    height: 60px;
    width: 200px;
    top: 24px;
    left: 30px;
    padding-top: 0px;
  }

  .envelope-container-big .letter.letterOpen::after {
    content: "";
    border-top: 110px solid transparent;
    border-left: 170px solid #eee;
    border-bottom: 110px solid #f8f8f8;
    border-right: 170px solid #fff;
    border-radius: 6px;
    z-index: 999;
    left: -6px;
    top: -22px;
  }
  .envelope-container-big .letter.letterOpen::before {
    background-size: 222px;
    position: absolute;
    left: -18px;
    bottom: 4px;
    width: 340px;
    height: 222px;
    background-repeat: no-repeat;
    background-position: center top;
    transform: rotate(0deg);
    z-index: 9999;
  }

  .letter.letter-big.letterOpen .envelopebx {
    margin-left: 0px;
  }

  .envelope-container.envelope-container-big {
    width: 250px;
    height: 160px;
    bottom: 0;
  }

  .envelope.envelope-big {
    border-top: 80px solid transparent;
    border-left: 125px solid #eee;
    border-bottom: 80px solid #f8f8f8;
    border-right: 125px solid #fff;
    border-radius: 6px;
    z-index: 9;
  }

  .flip.flip-big {
    top: 0;
    left: 0;
    border-top: 80px solid #dfdfe2;
    border-left: 125px solid transparent;
    border-bottom: 80px solid transparent;
    border-right: 125px solid transparent;
    border-radius: 6px;
    z-index: 6;
  }

  .envelope-container-big .letter.letterOpen::after {
    content: "";
    border-top: 80px solid transparent;
    border-left: 125px solid #eee;
    border-bottom: 80px solid #f8f8f8;
    border-right: 125px solid #fff;
    border-radius: 6px;
    z-index: 999;
    left: -30px;
    top: -25px;
  }

  .envelope-container-big .letter.letterOpen::before {
    background-size: 150px;
    position: absolute;
    left: -20px;
    bottom: -70px;
    width: 240px;
    height: 52px;
    background-repeat: no-repeat;
    background-position: center top;
    transform: rotate(0deg);
    z-index: 9999;
  } 

  .envelope.envelope-big::after {
    content: "";
    background-size: 150px;
    position: absolute;
    left: -118px;
    right: 0;
    bottom: -76px;
    z-index: 1;
    width: 240px;
    height: 52px;
    background-repeat: no-repeat;
    background-position: center top;
    transform: rotate(2deg);
  }

  .letter.letter-big.letterOpen .envelopebx {
    margin-left: 50px;
    bottom: 0;
    margin-top: 0;
    -webkit-transition-duration: 0.3s;
	transition-duration: 0.3s;
}

.envelope-container-big .letter .envelopebx {
  margin-left: 30px;
}

.letter.letter-big.letterOpen .envelopebx.envelopebx-big {
  margin-left:0;
  bottom: -10px;
  height: 80px;
}

  .envelopebx.envelopebx-finished {
    margin-top: 0px;
    /* margin-left: 90px; */
  }
 .envelopebx .text .etext-logo {
    width: 100px;
  }

.envelope-container-big .envelopebx .text .etext-logo {
  width: 160px;
}

.envelope-container-big .envelopebx.envelopebx-big .text .etext-logo {
  width: 160px;
}

.envelope-container-big .envelopebx.envelopebx-big .text .etext-name  { display: none; }

.envelopebx .text .etext-name{
  width: 0;
  opacity: 0;
  font-size: 0;  
  padding-left: 14px;}

.envelope-container-big .envelopebx .text .etext-name {
  padding-left: 80px;
  padding-top: 8px;
} 

.envelope-container-big .envelopebx-big .text .etext-name {
  padding-left: 25px;
}


.envelopebx {
  height: 70px;
}

.envelope-container-big .envelopebx {
  height: 80px;
}

  .envelopebx.envelopebx-big {
    width: 320px;
    height: 80px;
    bottom: 0;
}

.envelope-container.envelope-container-big .letter.letter-big.letterOpen {
  padding-top: 60px;
}

  @keyframes textflex {
      
      100% {
        display: flex;
        width: 100%;
        align-self: center;
        align-items: center;
      }

    }

  @keyframes etextshow {
    0% {
        width: 0;
        opacity: 0;
        font-size: 0;
        left: 0;
      } 
      
     90% {
        width: auto;
        opacity: 1;
        position: absolute;
        top: 9px;
        left: 100px;
        font-size: 13px;
      }
    
      100% {
        width: auto;
        opacity: 1;
        position: absolute;  
        top: 9px;
        left: 100px;
        font-size: 13px;
      } 

    }
 
@keyframes envelopenimatte1 { 
 0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
     width: 320px;
  }

  90% {
 /*   position: absolute;*/
    z-index: 99999;
  }
       
  100% {
    top: 160px;
    left: -100px;
    width: 320px;
    z-index: 99999;
    /*position: absolute;*/
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte2 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
     width: 320px;
  }
      
  90% {
    z-index: 99999;
   /* position: absolute;*/
  }
  100% {
    top: 230px;
    left: -100px;
    z-index: 99999;
    width: 320px;
    /*position: absolute;*/
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte3 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
     width: 320px;
  }
  90% {
    z-index: 99999;
   /* position: absolute;*/
  }

  100% {
    top: 300px;
    left: -100px;
    width: 320px;
    z-index: 99999;
  /*  position: absolute;*/
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte4 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
     width: 320px;
  }

  90% {
    z-index: 99999;
   /* position: absolute;*/
  }
       
  100% {
    top: 370px;
    left: -100px;
    width: 320px;
    z-index: 99999;
  /*  position: absolute;*/
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte5 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
     width: 320px;
  }
 /* 
  40% { top: -50px; z-index: 99999; position: relative;}
  50% { top: -20px; z-index: 99999; position: relative;}
  60% { top: 0px; z-index: 99999; position: relative;}
  70% { top: 30px; z-index: 99999; position: relative;}
  80% { top: 60px; z-index: 99999; position: relative;}
  89% { top: 90px; z-index: 99999; position: relative;}*/
  
  90% {
    z-index: 99999;
   /* position: absolute;*/
  }
  100% {
    top: 440px;
    left: -100px;
    width: 320px;
    z-index: 99999;
   /* position: absolute;*/
    transform: rotate(-0deg);
  }

}

@keyframes envelopenimatte6 {
0% {
    top: 00px;
    left: 0;
  }
  
  30% {
    top: -80px;
     width: 320px;
  }
   
  90% {
  /*  position: absolute;*/
    z-index: 99999;
  }

  100% {
    top: 510px;
    left: -100px;
    width: 320px;
  /*  position: absolute;*/
    z-index: 99999;
    transform: rotate(-0deg);
    }

}

.envelopebx .text .etext-name {
    min-width: 200px;
    text-align: left;
    
}

.envelopebx.envelopebx-big .text .etext-name {
    min-width: 0;
   
}

.envelope-container-big .envelopebx {
    height: 50px;
    margin-left: 0 !important;
}

.envelope-container .envelopebx {
    height: 50px;
    margin-left: 0 !important;
}

.envelope-container .envelopebx.envelope-d1 {
    margin-top: -50px !important;
}
 
.envelope-container .envelopebx.envelope-d2 {
    margin-top: -75px !important;
}

.envelope-container .envelopebx.envelope-d3 {
    margin-top: -100px !important;
}

.envelope-container .envelopebx.envelope-d4 {
    margin-top: -125px !important;
}
.envelope-container .envelopebx.envelope-d5 {
    margin-top: -150px !important;
}

.envelope-container .envelopebx.envelope-d6 {
    margin-top: -175px !important;
}


.envelope-container.envelope-container-big .envelopebx {
    height: 80px;
    margin-left: 0 !important;
}

.envelope-container.envelope-container-big .envelopebx.envelope-d1 {
    margin-top: 0px !important;
}
 
.envelope-container.envelope-container-big .envelopebx.envelope-d2 {
    margin-top: 0px !important;
}

.envelope-container.envelope-container-big .envelopebx.envelope-d3 {
    margin-top: 0px !important;
}

.envelope-container.envelope-container-big .envelopebx.envelope-d4 {
    margin-top: 0px !important;
}
.envelope-container.envelope-container-big .envelopebx.envelope-d5 {
    margin-top: 0px !important;
}

.envelope-container.envelope-container-big .envelopebx.envelope-d6 {
    margin-top: 0px !important;
}


}
