#vcard-party-name {
  margin-top: 0;
}

.legend {
  margin-top: -5px;
}
.legend .metric {
  margin-bottom: 5px;
  margin-top: 5px;
}

@media screen and (max-width: 1421px) {
  #uni-chart {
    margin-top: 0;
  }
}

.show-tablet {
  display: none;
}
/* TOM 2017 - Changed this from 'only screen' and 'min-device-width' etc. so it works on desktop too when the browser window gets squished. */
@media screen and (min-width: 320px) and (max-width: 1325px) {
  #app-header ul.parties li span.name {
    display: none !important;
  }
}
@media screen and (min-width: 320px) and (max-width: 1300px) {
  #frontbench .bench-pos {
    width: 12.5%;
  }
  #frontbench .bench-pos:nth-child( 17 ) {
    margin-left: 12.5%;
  }
  #frontbench .bench-pos .inner.unfilled {
    font-size: 12px;
  }
  .position-select.sorting:after {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    line-height: 100%;
    z-index: 10000;
    font-size: 20px;
    font-weight: bold;
    background: rgba(255, 255, 255, 0.7);
    content: 'Please wait... sorting politicians';
  }
  .party-select-options .party-filter:first-child {
    display: none !important;
  }
  #prompt {
    display: none !important;
  }
  .create-frontbench {
    display: block !important;
  }

  .ge2015 {
    /*margin-top: 10px;*/
    margin-right: 0 !important;
  }

  /* TOM 2017 - Remove arrows when squished in so much. */
  .person-filters .section a.trigger .arrow {
    display: none;
  }

  /* TOM 2017 - Helping with same problem as above. */
  .person-filters .section a.trigger {
    font-size: 12px;
  }

  /* TOM 2017 - Helping with same problem as above. */
  .person-filters .section a.trigger .icon {
    font-size: 15px;
  }

  /* TOM 2017 - making less of a margin */
  /* - not using right now, because it isn't smooth */
  #candidate-vcard {
    width: 55%;
    left: 48%;
  }

  /* TOM 2017 - add margin top */
  .nav-tabs li {
    margin-top: 5px;
  }

  /* TOM 2017 - Helps with when the buttons go onto another line */
  #filter-uni-oxbridge, #filter-uni-non-oxbridge, #filter-uni-none, #filter-uni-all
  {
    margin-top: 5px;
  }
}
@media only screen and (min-device-width: 320px) and (max-device-width: 1024px) {
   /* .hidden-tablet {
    display: none !important;
  }*/
  /*.show-tablet {
    display: block;
  }*/
  /*.not-available {
    width: 100%;
    line-height: 1.6;
    text-align: center;
    color: #666;
    margin-top: 150px;
  }*/
}
/* @media only screen and (min-device-width: 320px) and (max-device-width: 700px) { */
@media screen and (min-width: 320px) and (max-width: 815px) {
  #app-header {
    text-align: center;
    z-index: 200;
  }
  #app-header i {
    display: none;
  }
  #app-header a.brand {
    pointer-events: none;
    width: 100%;
    border: none;
  }
  #app-header a.brand img {
    margin-top: 10px;
  }
  ul.parties {
    position: absolute;
    top: 50px;
    left: 0;
    margin: 0 !important;
    background: #e4e6e5;
    width: 100%;
  }
  ul.parties li {
    margin: 0 !important;
  }
  ul.parties li span {
    margin: 0 !important;
  }
  ul.parties .name {
    display: none !important;
  }
  #frontbench {
    width: 100%;
    /*height: 300px;
    overflow-y: scroll;*/
    overflow-x: hidden;
    margin-top: 30px;
  }
  #frontbench .bench-pos {
    width: 100%;
    margin: 0 0 5px !important;
    height: 55px;
    line-height: 30px;
    border-bottom: 2px solid #fff;
    padding: 0 !important;
  }
  #frontbench .bench-pos .more-info {
    bottom: 11px !important;
  }
  #frontbench .bench-pos .inner {
    height: 55px;
  }
  #frontbench .bench-pos .inner img {
    height: 45px !important;
    width: auto !important;
  }
  #frontbench .bench-pos .inner .candidate-name {
    font-size: 12px !important;
  }
  #frontbench .bench-pos .inner .position-name {
    display: block;
    font-size: 12px !important;
    clear: none !important;
    margin-top: -10px;
  }
  #frontbench .bench-pos .voting-score {
    bottom: -8px;
    padding-top: 0;
    font-weight: bold;
    line-height: 55px;
    font-size: 11px;
  }
  #frontbench .bench-pos[data-id] .inner {
    padding-left: 35px;
  }
  #frontbench .bench-pos[data-id] a.remove {
    display: block !important;
    top: 0;
    left: 0;
    width: 30px;
    font-size: 18px;
    line-height: 55px;
    text-align: center;
    z-index: 10;
    height: 55px;
    -webkit-border-radius: 0;
        -moz-border-radius: 0;
        border-radius: 0;
  }
  #frontbench .bench-pos a.swap, #frontbench .bench-pos a.swapCancel {
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    font-size: 16px;
    line-height: 23px;
  }
  #frontbench .bench-pos .enqueue {
    bottom: 0;
    height: 55px;
    top: 0;
    left: 0;
    bottom: 0;
    line-height: 55px;
    right: 0;
  }
  /*p.not-available {
    margin-top: 20px;
  }*/
  .save-row {
    margin-bottom: 20px;
  }
  .save-row .btn {
    width: 100%;
    margin-bottom: 10px;
    display: inline-block;
    float: none !important;
    margin-left: 0 !important;
  }
  #short-instruction-popup,
  #generate-popup {
    max-width: 100%;
  }
  #candidate-vcard {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin-left: 0;
    width: 100%;
    z-index: 500;
    padding-left: 8px;
    padding-right: 8px;
  }
  .cabinet-pos-desc {
    top: 20px;
    left: 5%;
    width: 90%;
    margin: 0 !important;
    z-index: 500;
    position: absolute;
    padding: 8px 10px !important;
  }
    .cabinet-pos-desc h3 {
      font-size: 20px;
      margin-top: 5px !important;
    }
  #loading {
    z-index: 201;
  }
  #loading .inner {
    width: 90%;
    margin-left: 5%;
    margin-right: 5%;
    left: 0;
  }
  #uni-val-none,
  #uni-val-all,
  #leaning-val-none {
    margin-top: 10px;
  }

  /* TOM 2017 - Got rid of this */
  /*#filter-uni-none,
  #filter-uni-all {
    margin-top: 8px;
  }*/

  .close-card {
    width: 25px !important;
    height: 25px !important;
    font-size: 15px !important;
  }
  .section-title {
    display: none;
  }

  #save-prompt,
  #share-modal {
    max-width: 100%;
    left: auto;
    margin-left: 0;
  }

  .white-popup {
    max-width: 100% !important;
  }

  #generate-popup a[onclick="$.magnificPopup.close();"],
  #generate-popup a[onclick="$('a[href=#instructions-popup]').trigger('click')"] {
    margin-bottom: 10px;
  }

  .slider-cont {
    width: 100% !important;
  }

  .ge2015 {
    height: auto !important;
    text-align: center;
  }

  .ge2015 span.title {
    display: block;
    width: 100%;
    text-align: center;
  }

  .ge2015 a {
    width: 95%;
    margin-top: 5px;
  }

  /* TOM 2017 - Helps with filter buttons when they go onto multiple lines */
  .filter-row .buttons button
  {
    margin-top: 5px;
  }

  /* TOM 2017 - making everything smaller on the save popup so it fits a mobile screen. */
  #save-prompt h3 {
    padding: 5px 15px 0;
  }

  #save-prompt p {
    padding: 8px 15px;
    font-size: 12px;
    margin-bottom: 0 !important;
  }

  #save-prompt
  {
    height: 360px;
  }

  #save-promt form
  {
    font-size: 12px;
  }

  #save-prompt input
  {
    font-size: 12px;
  }

  #save-prompt span
  {
    font-size: 12px;
  }

  #frontbench .bench-pos .inner.unfilled a.more-info
  {
    right: 5px;
    top: 28px;
  }

  .filtered span.name, .filtered span.filter-val
  {
    font-size: 12px;
  }

  .cabinet-pos-desc .close
  {
    line-height: 28px;
    top: 5px;
    right: 5px;
  }

  .mobile-instructions-bar
  {
    display: block;
    background: #666;
    color: white;
    font-size: 12px;
    margin-top: 50px;
    text-align: center;
    padding: 6px;
  }

  #app-content
  {
    padding-top: 0px;
  }

  #choose-popup a img
  {
    width: 200px;
  }
}
@media screen and (min-width: 320px) and (max-width:  767px) {
  /* TOM 2017 - Helps with filter buttons when they go onto multiple lines */
  .filter-row .buttons button
  {
    margin-top: 0;
  }
}