/*
TODO: Fix CSS on iPad;
*/

@keyframes glitch
{
  0%   {
    transform:scale(1.5, 1,2);
    -ms-transform:scale(1.5, 1,2); /* IE 9 */
    -webkit-transform:scale(1.5, 1,2); /* Opera, Chrome, and Safari */
  }
  50%   {
    transform:translate(-200px, 400px);
    -ms-transform:translate(-200px, 400px); /* IE 9 */
    -webkit-transform:translate(-200px, 400px); /* Opera, Chrome, and Safari */ 
  }
  100%  {
    transform:translate(200px, 400px);
    -ms-transform:translate(200px, 400px); /* IE 9 */
    -webkit-transform:translate(200px, 400px); /* Opera, Chrome, and Safari */ 
  }
}

@-webkit-keyframes glitch
{
  0%   {
    transform:scale(1.5, 1,2);
    -ms-transform:scale(1.5, 1,2); /* IE 9 */
    -webkit-transform:scale(1.5, 1,2); /* Opera, Chrome, and Safari */
  }
  50%   {
    transform:translate(-200px, 400px);
    -ms-transform:translate(-200px, 400px); /* IE 9 */
    -webkit-transform:translate(-200px, 400px); /* Opera, Chrome, and Safari */ 
  }
  100%  {
    transform:translate(200px, 400px);
    -ms-transform:translate(200px, 400px); /* IE 9 */
    -webkit-transform:translate(200px, 400px); /* Opera, Chrome, and Safari */ 
  }
}

.text {
  margin-bottom: 80%; 
}

/* iPad */
@media only screen and (max-device-width : 1024px)  {
  .text {
    padding-bottom: 200%;  
  }
}

.text .intro {
  font-style: italic;
}

.text .intro {
  margin-bottom: 30px;
}

.message {
  padding: 10px;
  background-color: #f6f6f6;
  margin-bottom: 15px;
  margin-left: 0px;
  display: none;

  -webkit-transition: opacity .2s ease-in-out;
  -moz-transition: opacity .2s ease-in-out;
  -ms-transition: opacity .2s ease-in-out;
  -o-transition: opacity .2s ease-in-out;
  transition: opacity .2s ease-in-out;
}

#message-0 {
  display: block;
}

.message .metadata {
  font-size: 14px;
}

.message .metadata div {
  padding-left: 0;
  padding-right: 0;
}

.message .content {
  padding-left: 10px;
}

.message .metadata div {
  line-height: 17px;
}

.message .metadata.mobile {
  padding-left: 0;
  padding-right: 0;
  padding-bottom: 5px;
}

.message .metadata.mobile .username {
  float: left;
}

.message .metadata.mobile .timestamp {
  float: right;
}

.message.annie .username {
  color: rgb(189, 16, 16);
}

.message.david .username {
  color: #5430bb;
}

.message.status {
  text-align: center;
  font-style: italic;
  line-height: 30px;
}

.message.status .ellipsis {
  display: inline;
}

.message.status .metadata {
  display: none;
}

.message.status .metadata.mobile {
  display: none !important;
}

.message.status .content {
  width: 100%;
}

.messages.glitch.animate {
  -webkit-animation: glitch 0.01s infinite;
  -moz-animation:    glitch 0.01s infinite;
  -o-animation:      glitch 0.01s infinite;
  animation:         glitch 0.01s infinite;
} 

#next-message {
  cursor: pointer;
  padding: 10px;
  margin-left: 0px;
  border: solid 2px rgb(3, 99, 3);
  text-align: center;
  font-style: italic;
  margin-top: 30px;
  width: 300px;
  position: relative;
  left: 50%;
  margin-left: -150px;
  background-color: inherit;
}

#next-message.fixed {
  position: fixed;
  margin-left: -150px;
  bottom: 120px;
  left: 50%;
}

#next-message.mobile-fixed {
  border-width: 5px;
  background-color: #efefef;
  position: fixed;
  bottom: 0;
  width: 100%;
}

.end-text-social, #submissions {
  display: none;
}

.read-next {
  opacity: 0;
  pointer-events: none;
}

/* mobile */
@media only screen 
and (max-device-width : 768px)  { 
  #next-message {
    width: 100%;
    height: 150px;
    margin-left: -50%;
    position: absolute;
    margin-top: 50px;
  }

  #next-message.mobile-fixed {
    height: 30%;
  }

  #next-message.mobile-fixed:active {
    height: 30%;
    background-color: #D1D1D1;
  }

  .message {
    padding-top: 5px;
  }

  .message .metadata {
    font-size: 12px;
  }

  .message .content {
    font-size: 16px;
    line-height: 18px;
  }
}

/* Only iphone5 */
@media screen and (device-aspect-ratio: 40/71) {
  .message .content {
    font-size: 15px;
    line-height: 17px;
  } 
  #next-message.mobile-fixed {
    height: 150px;
  }  
}

/* iphone < 5 */
@media only screen and (min-device-width: 320px) 
and (max-device-width: 480px) 
and (-webkit-device-pixel-ratio: 2) 
and (device-aspect-ratio: 2/3) {
  #next-message.mobile-fixed {
    height: 110px;
  }
  .message .content {
    font-size: 15px;
    line-height: 17px;
  } 
}

/* iPad */
@media only screen 
and (min-device-width : 768px) 
and (max-device-width : 1024px)  {
  .message .content {
    font-size: 20px;
    line-height: 26px;
  }

  .message {
    padding-top: 10px;
  }

  #next-message {
    width: 100%;
    height: 150px;
    margin-left: -50%;
    position: absolute;
    margin-top: 50px;
  }
  #next-message.mobile-fixed {
    height: 30%;
  } 
}
