/* all mobiles and tablets */
@media (-moz-touch-enabled), (pointer:coarse), (hover:none) {
  .mobile-only { display: inline-block; }
  .desktop-only { display: none!important; }
  .vr-button { display: inline-block; }
  input { -webkit-appearance: none; }

  .mobile-popup-close-btn {
    position: absolute;
    top: 12vmin;
    right: 12vmin;
    width: 20px;
    height: 20px;
    background-image: url("../images/close-icon.png");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
  }

  #controls-wrap-mobile {
    display: inline-flex;
    position: absolute;
    top: 6px;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    height: 36px;
    width: 120px;
    justify-content:center;
  }

  #hotspot-info-container,
  #about-container {
    right: 0;
    width: 100%;
    height: calc(100% - 55px);
    top: 0;
    transform: translate(0%, 0%);
    -moz-transform: translate(0%, 0%);
    -ms-transform: translate(0%, 0%);
    -o-transform: translate(0%, 0%);
    -webkit-transform: translate(0%, 0%);
    background-color: rgba(0, 83, 160, 1.0);
    padding: 0 48px;
    box-sizing: border-box;
    text-align: left;
  }
  #about-container {
    right: 0;
    transform: translate(0%, 0%);
    -moz-transform: translate(0%, 0%);
    -ms-transform: translate(0%, 0%);
    -o-transform: translate(0%, 0%);
    -webkit-transform: translate(0%, 0%);
  }
  #hotspot-info-container a, #hotspot-info-container p, #about-container p, #hotspot-info-container li {
    font-size: 0.8rem;
  }
}

/* possibly all phones, no tablets */
@media only screen and (max-width: 820px) {
  body { margin: 0; }
}

@media only screen and (max-width: 820px) and (orientation: landscape) {
  #rotate-device-layer { display: inherit; }
}

/* iPhone X */
@media only screen
and (min-device-width : 375px)
and (max-device-width : 812px)
and (-webkit-device-pixel-ratio : 3)
and (orientation : landscape) {
  #splash h2 { margin-bottom: 2em!important; }
  #gallery .popup-content { width: 44vmax; }
  #gallery-thumbs { grid-column-gap: 10vmin; }
  .popup-content { font-size: 0.8em; }

  .social-btn {
    width: 8vh!important;
    height: 8vh!important;
  }

  .pano-btn {
    width: 6vh!important;
    height: 12vh!important;
  }

  #rotate-device-layer { display: block; }
}

@media only screen
and (min-device-width : 375px)
and (max-device-width : 812px)
and (-webkit-device-pixel-ratio : 3)
and (orientation : portrait) {
  header, .hotspot-info-logo-jewson, .secondary-logo, .hotspot-info-logo-gobain { height: 6vmax; }
}

/* Samsung S8 */
@media only screen
and (device-width : 360px)
and (orientation : portrait) {
  header, .hotspot-info-logo-jewson, .secondary-logo, .hotspot-info-logo-gobain { height: 6vmax; }
}

@media only screen
and (max-device-height : 360px)
and (min-device-width : 768px)
and (max-device-width : 1024px)
and (orientation : landscape) {
  #version-switch { bottom: 72px!important; }
  .control {
    height: 36px!important;
    width: 36px!important;
  }
  header, .hotspot-info-logo-jewson, .secondary-logo, .hotspot-info-logo-gobain { height: 4vmax!important;}
  .hotspot-info-logo-bg { height: 40%!important; }
  #hotspot-info-content, #about-content {
    top: 10vmax!important;
    left: 10vmax!important;
    width: 70vmax!important;
  }
  #hotspot-info-container a, #hotspot-info-container p, #about-container p, #hotspot-info-container li  { font-size: 3vmin!important; }
  #rotate-device-layer { display: block; }
}

/* iPhone 8 */
@media only screen
    and (device-width : 375px)
    and (device-height : 667px)
    and (-webkit-device-pixel-ratio : 2) {
}

/* iPhone 8 Plus */
@media only screen
    and (device-width : 414px)
    and (device-height : 736px)
    and (-webkit-device-pixel-ratio : 3) {
}

/* iphone 6 and friends */
@media only screen and (max-width: 720px) and (orientation: portrait)  {
  h2 { font-size: 1em; }

  header {
    top: 2vmax;
    left: 3vmax;
    height: 8vmax;
  }
  .secondary-logo {
    top: 2vmax;
    right: 3vmax;
    height: 8vmax;
  }

  .popup-content { width: 80vw; }
  .version-select { width: 24vmin; }
  #splash-btn-container { width: 100%; }

  #version-switch {
    right: 12px;
    bottom: 60px;
    font-size: 0.8em;
  }
  footer { height: 54px; }
  #credits, #current-pano {
    bottom: 10px;
    font-weight: bold;
  }
  #current-pano { left: 12px; }
  #credits   { right: 12px; }
  #info-btn, #navigate-btn {
    width:  32px;
    height: 32px;
  }
/*
  #credits {
    padding-bottom: 2px;
    font-size: 9px;
  }
*/
  #credits, #current-pano { font-size: 0.8em; }

  .popup {
    bottom: 56px;
    height: calc(100% - 54px);
  }

  .control {
    height: 28px;
    width: 28px;
  }
}

@media only screen and (max-width: 720px) and (orientation: landscape)  {
  #splash-btn-container { width: 100%; }
  .version-select {
    height: 20vmin;
    width: 40vmin;
  }

  #gallery .popup-content { width: 44vmax; }
  #gallery-thumbs { grid-column-gap: 10vmin; }
  .popup-content { font-size: 0.8em; }

  #version-switch {
    right: 12px;
    bottom: 72px;
    font-size: 0.8em;
  }
  footer { height: 54px; }
  .control {
    height: 36px;
    width: 36px;
  }

  #hotspot-info-container,
  #about-container {
    right: 0;
    width: 100%;
    height: calc(100% - 55px);
    top: 0;
    transform: translate(0%, 0%);
    -moz-transform: translate(0%, 0%);
    -ms-transform: translate(0%, 0%);
    -o-transform: translate(0%, 0%);
    -webkit-transform: translate(0%, 0%);
    background-color: rgba(0, 83, 160, 1.0);
    padding: 0 48px;
    box-sizing: border-box;
    text-align: left;
  }
  #about-container {
    right: 0;
    transform: translate(0%, 0%);
    -moz-transform: translate(0%, 0%);
    -ms-transform: translate(0%, 0%);
    -o-transform: translate(0%, 0%);
    -webkit-transform: translate(0%, 0%);
  }
  #hotspot-info-container a, #hotspot-info-container p, #about-container p, #hotspot-info-container li {
    font-size: 0.8rem;
  }
  #credits a::after {
    content: "360° Virtual Tour created by Pan 3Sixty";
  }

  .hotspot-info-logo-gobain {
    position: absolute;
    top: 3.125vw;
    right: 3.125vw;
    height: 7vw;
  }
  .hotspot-info-logo-jewson {
    position: absolute;
    top: 3.125vw;
    left: 3.125vw;
    height: 7vw;
  }
  .hotspot-info-logo-gobain, .hotspot-info-logo-jewson { width: auto; margin: 0; }
  .hotspot-info-logo-bg { height: 36%; }
  #hotspot-info-container, #about-container { height: calc(100% - 55px);}
  #hotspot-info-content, #about-content {
    top: 30%;
    left: 5%;
    width: 90%;
  }
  #hotspot-info-container h2, #about-container h2 { font-size: 14px;}
  #credits, #current-pano { bottom: 8px; }
  #hotspot-info-close-btn, #about-close-btn { bottom: 2%; }
  ul { margin-top: 0.1vh; }
}

/* ipad */
@media only screen
  and (min-device-width : 768px)
  and (max-device-width : 1024px)
{
  #splash-btn-container { width: 100%; }
  #splash h2 { margin-bottom: 4em; }
  #splash p { font-size: 1.2em; }
  .vr-button { display: none; }

  header, .hotspot-info-logo-jewson {
    top: 4vmin;
    left: 5vmin;
    height: 11vmin;
    margin: 0;
    width: auto;
  }
  header img { height: 100%; }
  .secondary-logo, .hotspot-info-logo-gobain {
    top: 4vmin;
    right: 5vmin;
    height: 11vmin;
    margin: 0;
    width: auto;
  }

  #version-switch {
    right: 12px;
    bottom: 60px;
  }
  footer { height: 54px; }
  #credits, #current-pano {
    bottom: 10px;
    font-weight: bold;
  }

  #credits   { right: 12px; }
  #info-btn, #navigate-btn {
    width:  32px;
    height: 32px;
  }

  .popup {
    bottom: 56px;
    height: calc(100% - 54px);
  }

  .pano-btn {
    width: 3vh;
    height: 6vh;
  }

  .social-btn {
    width: 4.5vh;
    height: 4.5vh;
  }
  #social-wrap { bottom: 62.5vh; }

  .control {
    height: 28px;
    width: 28px;
  }

  #hotspot-info-content, #about-content {
    top: 40vmin;
    left: 15vmin;
    width: 60vmin;
  }
  #hotspot-info-container h2, #about-container h2 { font-size: 4vmin; }
  #hotspot-info-container a, #hotspot-info-container p, #about-container p, #hotspot-info-container li { font-size: 2.5vmin; }
}

@media only screen
  and (min-device-width : 768px)
  and (max-device-width : 1024px)
  and (orientation : portrait) {
}

@media only screen
  and (min-device-width : 768px)
  and (max-device-width : 1024px)
  and (orientation : landscape) {
  .vr-button { display: none; }
  header, .hotspot-info-logo-jewson {
    top: 2.75vmax;
    left: 4vmax;
    height: 8vmax;
    margin: 0;
    width: auto;
  }
  header img { height: 100%; }
  .secondary-logo, .hotspot-info-logo-gobain {
    top: 2.75vmax;
    right: 4vmax;
    height: 8vmax;
    margin: 0;
    width: auto;
  }
  .hotspot-info-logo-bg { height: 30%; }
  #hotspot-info-content, #about-content {
    top: 22vmax;
    left: 15vmax;
    width: 60vmax;
  }
  #credits a::after {
    content: "360° Virtual Tour created by Pan 3Sixty";
  }
}
