/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

@media screen and (max-width: 640px) {
  #wrapper {
    width: 320px;
  }

  hr {
    width: 300px;
  }

  #content {
    padding: 122px 0 84px;
    margin: 0 10px;
  }

  #header {
    padding: 20px 30px;
  }

  #header ul.nav {
    float: left;
    width: 260px;
    margin-top: 10px;
  }

  #header ul.nav li {
    margin: 0 1px 0 0;
    text-align: center;
    width: 64px;
  }

  #header ul.nav li:first-child {
    width: 102px;
  }

  #header ul.nav li:nth-child(2) {
    width: 91px;
  }


  #header ul.nav li a {
    padding: 3px 0;
    background-color: #549FDC;
    color: #fff;
    display: block;

    -webkit-border-radius: 3px;
       -moz-border-radius: 3px;
         -o-border-radius: 3px;
            border-radius: 3px;
  }

  body.authenticated #header ul.nav li.signOut,
  #header ul.nav li {
    display: block;
  }

  #header ul.nav li.signOut,
  body.authenticated #header ul.nav li.signIn {
    display: none;
  }

  #header ul.nav li a {
    -webkit-border-radius: 0 3px 3px 0;
       -moz-border-radius: 0 3px 3px 0;
         -o-border-radius: 0 3px 3px 0;
            border-radius: 0 3px 3px 0;
  }

  #header ul.nav li:first-child a {

    -webkit-border-radius: 3px 0 0 3px;
       -moz-border-radius: 3px 0 0 3px;
         -o-border-radius: 3px 0 0 3px;
            border-radius: 3px 0 0 3px;
  }

  #header ul.nav li:nth-child(2) a {
    -webkit-border-radius: 0px;
       -moz-border-radius: 0px;
         -o-border-radius: 0px;
            border-radius: 0px;
  }

  #header ul.nav li a.signIn {
    background-color: rgba(0,0,0,0.1);
    color: #222;
  }

  #header ul.nav li a:hover {
    text-decoration: none;
  }

  #signUp {
    width: 320px;
    padding: 0 10px;
    font-size: 16px;
    line-height: 21px;
    margin: 0 0 90px;  /* Add a bottom margin so the footer is never overlapped. */
  }

  #signUp p {
    padding: 0 20px;
  }

  #card {
    width: 260px;
    height: 80px;
    background-position: center top;
    background-size: 50%;
    position: relative;
    margin: 0 20px 20px;
    top: auto;

    -webkit-transition: none;
       -moz-transition: none;
         -o-transition: none;
            transition: none;
  }

  button.create {
    font-size: 14px;
    height: 28px;
    padding: 0 12px;
  }

  #card.insert {
    background-position: center top;
  }

  #card img {
    display: none;
  }

  #hint,
  #status {
    display: none;
  }

  #legal {
    padding: 20px;
    text-align: left;
  }

  #legal li {
    list-style-position: inside;
  }

  #about {
    padding: 0;
  }

  #about .video,
  #about .video img {
    width: 300px;
    height: auto;
  }

  .row {
    padding: 20px 20px 0;
    margin: 0;
  }

  .row div {
    width: auto;
    height: auto;
    vertical-align: inherit;
    display: block;
    padding: 20px 0;
  }

  .row img {
    float: none;
    width: 260px;
    height: auto;
  }

  .row p {
    float: none;
    display: block;
    width: 260px;
    text-indent: -33px;
    padding-left: 33px;
  }

  #signUpFormWrap {
    margin: 122px 10px 122px;
  }

  #manage {
    padding: 20px;
    text-align: left;
  }

  #manage .edit {
    margin: 36px 0 14px;
  }

  #manage #emails {
    margin: 0 0 36px;
  }

  #emails .email,
  #emails .activity {
    display: block;
    width: 260px;
  }

  #emails .activity span {
    float: left;
  }

  #disclaimer {
    text-align: left;
  }

  #footer {
    padding: 20px 30px;
  }

  #emailList .email {
    width: auto;
    float: left;
  }

  #emailList .activity {
    width: auto;
    float: right;
  }

  #newsbanner {
    margin: 115px 0 28px 0; /* put a margin-top on so that it does not go under the header */

  }
}
