/* A strategic decision has been to make the main cutoff point below iPad (all versions). Thus,
   we begin to make main adjustments (change menu and alter user flow) below 768px wide which is the iPad in standing mode. */

@media only screen and (max-width: 1259px)  {

  .horizon {
    display: none;
  }

}


@media only screen and (max-width: 1249px)  {

  /* General stuff */
  .center {
    width: 980px;
  }

  .sidebar-second {
    margin-top: 40px;
    width: auto;
    float: none;
    text-align: center;
  }

  .sidebar-second > div {
    display: inline-block;
    vertical-align: top;
    margin-left: 20px;
    margin-top: 0;
    margin-bottom: 20px;
  }

  .sidebar-second > div[style] {
    margin-top: 0;
  }

  .sidebar-second > div:not([style]) {
    margin-left: 0;
    margin-bottom: 0;
  }

  .main-content {
    float: none;
  }

  .main-nav a {
    padding: 10px;
    background-position: 10px center;
    padding-left: 45px;
  }

  .main-nav .icon-about a {
    padding-left: 30px;
  }

  .main-nav .icon-cartree a {
    padding-left: 33px;
  }

  .main-nav .icon-blog a {
    padding-left: 32px;
  }

  .main-nav .icon-company a {
    padding-left: 32px;
  }

  .main-nav .icon-kvd a {
    padding-left: 45px;
  }

  .main-nav .icon-buysell a {
    padding-left: 35px;
  }

  .footer .widget:last-child {
    clear: both;
    width: auto;
    margin-left: 0;
    margin-top: 40px;
  }

}


@media only screen and (max-width: 980px)  {

  .tablet-top-ad {
    display: block;
  }

  #kvdb-wrapper {
    display: none !important;
  }

  body {
    margin: 0;
  }

  /* General stuff */
  .center {
    width: auto;
    margin-left: 10px;
    margin-right: 10px;
  }

  .main-content .sidebar-first,
  .main-content .main-column,
  .main-content,
  .sidebar-second {
    width: auto;
    float: none;
  }

  .footer .widget {
    width: 48%;
    margin: 40px 0 0 2%;
  }

  .footer .widget:nth-child(2),
  .footer .widget:first-child {
    margin-top: 0;
  }

  .footer .widget:nth-child(1),
  .footer .widget:nth-child(3) {
    margin-left: 0;
    clear: both;
  }

  .sidebar-first > ul {
    text-align: center;
    margin-top: 0;
    padding: 0 20px 20px 0;
    border-left-width: 1px;
    border-top-width: 0;
    background: #aaadb5;
    background: -moz-linear-gradient(top,  #aaadb5 0%, #dde1e9 4%, #dde1e9 100%);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#aaadb5), color-stop(4%,#dde1e9), color-stop(100%,#dde1e9));
    background: -webkit-linear-gradient(top,  #aaadb5 0%,#dde1e9 4%,#dde1e9 100%);
    background: -o-linear-gradient(top,  #aaadb5 0%,#dde1e9 4%,#dde1e9 100%);
    background: -ms-linear-gradient(top,  #aaadb5 0%,#dde1e9 4%,#dde1e9 100%);
    background: linear-gradient(to bottom,  #aaadb5 0%,#dde1e9 4%,#dde1e9 100%);
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#aaadb5', endColorstr='#dde1e9',GradientType=0 );
  }

  .sidebar-first .widget {
    text-align: left;
    width: 204px;
    margin: 20px 0 0 20px;
    display: inline-block;
    vertical-align: top;
  }

  .sidebar-first .widget:first-child {
    margin-top: 20px;
  }

  .sidebar-second {
    margin-top: 20px;
    margin-left: -20px;
  }

  select {
    font-size: 14px;
  }

  .mobile-display {
    display: block;
  }

  .desktop-display {
    display: none !important;
  }

  .main-content-area {
    margin: 0;
  }

  .main-content .search-box {
    -webkit-border-top-left-radius: 0;
    -webkit-border-top-right-radius: 0;
    -moz-border-radius-topleft: 0;
    -moz-border-radius-topright: 0;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }

  .main-content .search-box,
  .main-content .content-header,
  .main-content .hfeed {
    border-left: 0;
    border-right: 0;
  }

  .header {
    border-bottom: 0;
    background: #727272; /* Old browsers */
    background: -moz-linear-gradient(top,  #727272 0%, #393939 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#727272), color-stop(100%,#393939)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top,  #727272 0%,#393939 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top,  #727272 0%,#393939 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top,  #727272 0%,#393939 100%); /* IE10+ */
    background: linear-gradient(to bottom,  #727272 0%,#393939 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#727272', endColorstr='#393939',GradientType=0 ); /* IE6-9 */
  }

  .sitename a {
    background-image: url('../img/logo-bilpriser-mobile.png');
  }

  .sitename .logo {
    height: 20px;
    background-image: none;
  }

  .sitename .logo:hover {
    background: #f58f37;
  }

  .main-nav {
    display: none;
  }

  .mobile-nav,
  .mobile-nav-toggle {
    display: block;
  }

  .content-header .header-title {
    padding: 10px;
    font-size: 20px;
  }

  .content-header .header-image {
    margin-left: -15px;
    margin-top: -15px;
    max-width: 33%;
  }

  body.page-template-template-bilvardering-iframe-php .content-header .header-image {
    margin-left: 0;
    margin-top: 0;
  }

  .content-header .header-sub {
    margin-top: -15px;
    line-height: 1.5em;
    padding: 10px;
  }

  .content-header .header-image ~ * {
    margin-left: 34%;
  }

  .content-header .header-image ~ .header-title {
    padding-top: 0;
  }

  .content-header-valuation-data #valuation-share-wrap {
    position: static;
    text-align: left;
  }

  .content-header-valuation-data #valuation-share-wrap .addthis_toolbox a {
    display: inline-block;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .content-header .blog-header {
    padding: 10px;
  }

  .content-header .blog-header .blog-header-links,
  .content-header .blog-header .blog-header-title {
    float: none;
  }

  .content-header .blog-header .blog-header-links a {
    margin: 5px 5px 0 0;
    background-color: rgba(0, 0, 0, .3);
    padding: 10px 15px;
  }

  .content-header .blog-header .blog-header-links a:hover,
  .content-header .blog-header .blog-header-links a:focus {
    background-color: rgba(0, 0, 0, .4);
  }

  .main-content .hentry .full-post {
    margin-left: 0;
    margin-right: 0;
  }

  .main-content .hentry:nth-child(1) .post-meta b,
  .main-content .comment-author b {
    display: block !important;
    margin-left: 0;
  }

  .main-content #comments .comment, .main-content #comments > * {
    margin-top: 20px;
  }

  .add-comment-link {
    display: block !important;
    float: none !important;
    padding-top: 10px !important;
    margin-top: 10px;
  }

  .addthis_toolbox {
    float: none !important;
  }

  .addthis_toolbox a {
    display: block;
    float: none !important;
    margin-left: 0 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }

  .addthis_toolbox a:first-child {
    padding-top: 0 !important;
  }

  .addthis_toolbox a:nth-child(4) {
    padding-bottom: 0 !important;
  }

  .atclear {
    display: none;
  }

  .main-content img.featured-image.archive {
    float: none;
    margin-bottom: 10px;
  }

  .main-content img.archive + .title,
  .main-content img.archive + .title + .legible {
    margin-left: 0;
  }

  /* Valuation template */
  .widget.bp_valuation_tabs,
  body.page-template-template-bilvardering-php .cartree-car-img {
    display: none !important;
  }

  body.page-template-template-bilvardering-php .cartree-content {
    margin-left: 10px !important;
    margin-right: 10px;
  }

  body.page-template-template-bilvardering-php .hfeed {
    padding-top: 10px;
    border-bottom: 0;
  }

  .filter-form .form-item.addons-group,
  .filter-form .form-item.packages-group,
  .filter-form .distance-group,
  .filter-form .value_decrement_start-group,
  .filter-form .form-item.brand_id-group,
  .filter-form .form-item.y-group,
  .filter-form .form-item.family_id-group,
  .filter-form .form-controls a {
    display: block;
    width: 100% !important;
    float: none !important;
    margin-top: 0 !important;
    padding-top: 10px !important;
    margin-left: 0 !important;
  }

  .filter-form select {
    width: 100%;
  }

  .valuation-box {
    margin-left: 0;
    margin-right: 0;
  }

  .filter-valuation .filter-form {
    position: static;
    background: transparent;
    padding-left: 0;
    padding-right: 0;
  }

  .filter-form .standard_addons-group {
    -webkit-column-count: 1;  -webkit-column-gap: 0;
       -moz-column-count: 1;     -moz-column-gap: 0;
            column-count: 1;          column-gap: 0;
  }

  .filter-form .column-first,
  .filter-form .column-second {
    float: none;
    width: auto;
  }

  .filter-form .form-item.brand_id-group,
  .filter-form .form-controls input:first-child {
    margin-top: 0;
  }

  body.page-template-template-bilvardering-php .tab-switcher {
    margin-top: 3px;
  }

  .overlay-back {
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: auto;
    position: fixed;
  }

  body.admin-bar .overlay-back {
    top: 154px;
  }

  .overlay-main,
  .overlay-main.default-message {
    width: auto;
    margin: auto;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
  }

  body.admin-bar .overlay-main,
  body.admin-bar .overlay-main.default-message {
    top: 170px;
  }

  body.page-template-template-bilvardering-php .cartree-extra-data {
    margin: 0;
  }

  .top-5 .valuation-sub-title {
    margin-bottom: 5px;
  }

  .top-5 > ul .widget {
    display: inline-block;
    vertical-align: top;
  }

  .top-5 > ul .widget .top-5-push {
    margin-left: 0;
    text-align: center;
    margin-bottom: 15px;
    display: inline-block;
    width: 110px;
    min-height: 100px;
  }

  .top-5,
  .valuation-pushes {
    width: auto;
    text-align: center;
    margin: 20px 25px 2px 0 !important;
  }

  .top-5 h3 {
    text-align: left;
  }

  .top-5 .top-5-push,
  .valuation-pushes .valuation-push {
    margin-top: 18px;
    margin-left: 18px !important;
    margin-right: 0;
    margin-bottom: 0;
    width: 110px;
  }

  .top-5 .top-5-push img {
    float: none;
  }

  .top-5 .top-5-push .top-5-push-title,
  .top-5 .top-5-push .top-5-push-text {
    margin-left: 0 !important;
  }


  /* Valuation form on all the different pages */
  .search-box {
    padding: 10px !important;
  }

  .search-box input[type="text"],
  .search-box .btn {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .search-box input[type="text"] {
    border-radius: 3px;
    width: 370px;
    padding-left: 5px;
    background-image: none;
    margin-right: 5px;
  }

  .search-box .manual-valuation-link {
    padding-left: 30px;
    padding-right: 30px;
  }

  .valuation-form {
    text-align: left;
  }

  .search-box .mobile-submit {
    display: inline-block !important;
  }

  /* Feature pushes */
  .bp_iframe_push {
    display: none;
  }

  .bp_push_cartree .center,
  .bp_search_push .center,
  .bp_search_push.ad-panorama .center,
  .bp_features_push .center,
  .bp_blog_push .center,
  .bp_push .center {
    width: auto;
    text-align: center;
  }

  .bp_search_push.ad-panorama .legible
  .bp_search_push .legible {
    max-width: none;
  }

  .bp_features_push,
  .bp_blog_push,
  .bp_push {
    padding: 20px 0;
  }

  .bp_features_push .first-column,
  .bp_features_push .second-column,
  .bp_features_push .third-column {
    display: block;
    text-align: center;
    margin: 40px 0 0;
    padding: 0;
    border: 0;
    width: auto;
    position: static;
  }

  .bp_features_push .first-column {
    margin-top: 0;
  }

  .bp_features_push .first,
  .bp_features_push .second,
  .bp_features_push .third {
    margin-left: auto;
    margin-right: auto;
    text-align: left;
  }

  .bp_blog_push a.left,
  .bp_blog_push a.right,
  .bp_push a.left,
  .bp_push a.right {
    float: none;
    margin: 0;
    max-width: 100%;
    height: auto;
  }

  .bp_blog_push a.right ~ *,
  .bp_push a.right ~ *,
  .bp_blog_push a.left ~ *,
  .bp_push a.left ~ * {
    margin: 20px 0 0 0;
  }

  .bp_blog_push .first-post {
    border-bottom: 0;
    padding-bottom: 0;
  }

  .bp_search_push {
    padding: 40px 20px 0;
    overflow: visible;
    z-index: 3;
    filter: none;
  }

  .bp_search_push.ad-panorama .search.box,
  .bp_search_push .search-box {
    width: auto;
    margin-left: -30px !important;
    margin-right: -30px !important;
  }

  .bp_features_push .title,
  .bp_search_push .title,
  .bp_blog_push .title,
  .bp_leader_push .title,
  .bp_push .title {
    font-size: 30px;
  }

  .bp_search_push .introduction,
  .bp_search_push .title {
    max-width: none;
  }

  .bp_search_push .search-filter {
    top: 100%;
    right: -1px;
    bottom: auto;
    box-shadow: 0px 2px 2px 1px rgba(0,0,0,0.3);
    -webkit-border-bottom-right-radius: 5px;
    -webkit-border-bottom-left-radius: 5px;
    -moz-border-radius-bottomright: 5px;
    -moz-border-radius-bottomleft: 5px;
    border-bottom-right-radius: 5px;
    border-bottom-left-radius: 5px;
    -webkit-border-top-right-radius: 0;
    -webkit-border-top-left-radius: 0;
    -moz-border-radius-topright: 0;
    -moz-border-radius-topleft: 0;
    border-top-right-radius: 0;
    border-top-left-radius: 0;
  }

  /* Cartree from a plugin */
  body.page-id-2757 .cartree-intro {
    padding-left: 0;
    padding-top: 100px;
    margin-bottom: 0;
  }

  body.page-id-2757 .top-5 {
    margin-top: 23px !important;
  }

  .cartree-list.col4 li {
    text-align: left !important;
  }

  .csscolumns .cartree-list.col4 {
    -webkit-column-count: 2;
    -moz-column-count: 2;
    column-count: 2;
    -webkit-column-gap: 15px;
    -moz-column-gap: 15px;
    column-gap: 15px;
  }

  .no-csscolumns .cartree-list.col4 li {
    width: 46%;
  }

  .cartree-extra-data {
    float: none;
  }

  .cartree-content {
    margin-left: 0;
    float: none;
    width: auto;
  }

  .cartree-valuation-box,
  .cartree-car-img {
    width: auto;
  }

  .cartree-ads {
    padding: 20px 20px 20px 0 !important;
    text-align: center;
  }

  .cartree-ads .similar-car-content {
    padding: 0 40px 0 60px;
  }

  .cartree-ads .similar_objects {
    margin-bottom: 20px;
    margin-left: 20px !important;
  }

}


@media only screen and (max-width: 730px)  {

  .tablet-top-ad {
    display: none;
  }

}


@media only screen and (max-width: 710px)  {

  body.page-template-template-bilvardering-iframe-php .search-box input[type="text"] {
    width: 170px;
  }

}


@media only screen and (max-width: 700px)  {

  .valuation-results > * {
    float: left;
    width: 48%;
    margin-left: 2%;
  }

  .valuation-results > *:nth-child(2n+1) {
    margin-left: 0;
  }

  .valuation-results .carfax-wrapper {
    float: none;
    width: auto;
  }

}


@media only screen and (max-width: 615px)  {

  .mobile-top-ad {
    display: block;
  }

  .bp_search_push .search-filter {
    left: -1px;
  }

  .bp_search_push .search-filter select {
    max-width: 98;
  }

  .start_column2,
  .start_column1 {
    float: none;
    width: auto;
    margin-left: 0;
  }

  .search-box input[type="text"] {
    width: 170px;
  }

  .search-box .manual-valuation-link {
    padding-left: 15px;
    padding-right: 15px;
  }

  body.page-template-template-bilvardering-php .valuation-results .valuation-price {
    font-size: 16px;
  }

  .benefits .benefit {
    display: block;
    width: auto;
    margin-left: 0;
    margin-top: 20px;
  }

  .benefits .benefit-wide .benefit-content {
    padding: 14px;
  }

  .benefits .benefit-wide .benefit-btn {
    position: static;
  }

}


@media only screen and (max-width: 469px)  {

  .sidebar-first ul {
    padding-top: 20px;
  }

  .sidebar-first .widget:first-child {
    margin-top: 0;
  }

  .sidebar-first .widget {
    display: block;
    width: auto;
  }

  li.widget[style="display: list-item"] {
    display: inline-block !important;
  }

  .top-5,
  .valuation-pushes {
    margin-right: 0 !important;
  }

  .top-5 .top-5-push,
  .valuation-pushes .valuation-push {
    width: auto !important;
    height: auto;
    min-height: 0;
    display: block;
    float: none;
    margin-left: 0 !important;
  }

  .top-5 .top-5-push[style*="display: inline-block"] {
    display: block !important;
  }

  .valuation-push:last-child {
    margin-bottom: 0 !important;
  }

  body.page-template-template-bilvardering-iframe-php .content-body table {
    float: none;
    margin-left: 0;
    width: 100%;
  }

  body.page-template-template-bilvardering-iframe-php .content-body table td {
    width: 50%;
  }

}


@media only screen and (max-width: 380px)  {

  .valuation-form .manual-valuation-link {
    font-size: 9px;
    padding-left: 10px;
    padding-right: 10px;
  }

  .valuation-form .manual-valuation-link .icon {
    display: none;
  }

  .value-similar-cars-content a {
    display: block;
    width: auto;
    margin-right: 0;
    float: none;
  }

}


/*
  This is pretty much the smallest you can make the firefox screen without programmatically setting the width.
  Chrome and Safari prevents you from going below 400px. An iPhone is 320px, and the smallest Android about 240px IIRC.
  The site is pretty much useless like this, so... have an egg.
*/
@media only screen and (max-width: 92px)  {

  body * {
    display: none;
  }

  body:after {
    content: "Help! I'm smaller than a Mini Cooper!";
    padding: 20px 10px;
    display: block;
  }

}