/* Copyright 2013 The Chromium Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file. */

html,
body {
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}

body {
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

body.ready {
  opacity: 1;
}

.icon {
  -webkit-user-select: none;
  user-select: none;
  display: inline-block;
}

.icon-offline {
  content: -webkit-image-set(
    url(/search/events/googlebot/assets/default_100_percent/100-error-offline.png) 1x,
    url(/search/events/googlebot/assets/default_200_percent/200-error-offline.png) 2x
  );
  position: relative;
}

.hidden {
  display: none;
}

/* Offline page */

.interstitial-wrapper {
  color: #2b2b2b;
  font-size: 1em;
  line-height: 1.55;
  margin: 0 auto;
  padding-top: 100px;
  position: relative;
  width: 100%;
}

.runner-container {
  height: 150px;
  overflow: hidden;
  position: absolute;
  top: 35px;
  width: 100px;
  left: 0;
  right: 0;
  margin: auto;
  transform-origin: top center;
}

.runner-canvas {
  height: 150px;
  opacity: 1;
  overflow: hidden;
  position: absolute;
  top: 0;
  z-index: 2;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

.controller {
  background: rgba(247, 247, 247, 0.1);
  height: 100vh;
  left: 0;
  position: absolute;
  top: 0;
  width: 100vw;
  z-index: 1;
}

#offline-resources {
  display: none;
}

@media (max-width: 420px) {
  .suggested-left > #control-buttons,
  .suggested-right > #control-buttons {
    float: none;
  }
  .snackbar {
    left: 0;
    bottom: 0;
    width: 100%;
    border-radius: 0;
  }
}

@media (max-height: 350px) {
  h1 {
    margin: 0 0 15px;
  }
  .icon-offline {
    margin: 0 0 10px;
  }
  .interstitial-wrapper {
    margin-top: 5%;
  }
  .nav-wrapper {
    margin-top: 30px;
  }
}

@media (min-width: 600px) and (max-width: 736px) and (orientation: landscape) {
  .interstitial-wrapper {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (min-width: 420px) and (max-width: 736px) and (min-height: 240px) and (max-height: 420px) and (orientation: landscape) {
  .interstitial-wrapper {
    margin-bottom: 100px;
  }
}

@media (min-height: 240px) and (orientation: landscape) {
  .interstitial-wrapper {
    margin-bottom: 90px;
  }
  .icon-offline {
    margin-bottom: 20px;
  }
}

@media (max-height: 320px) and (orientation: landscape) {
  .icon-offline {
    margin-bottom: 0;
  }
  .runner-container {
    top: 10px;
  }
}

@media (max-width: 240px) {
  .interstitial-wrapper {
    overflow: inherit;
    padding: 0 8px;
  }
}

/* Arcade mode styling */
.arcade-mode,
.arcade-mode .runner-container,
.arcade-mode .runner-canvas {
  max-width: 100%;
  overflow: hidden;
}

.arcade-mode #buttons,
.arcade-mode #main-content {
  opacity: 0;
  overflow: hidden;
}

.arcade-mode .interstitial-wrapper {
  max-width: 100%;
  overflow: hidden;
  padding-top: 0;
  margin: 0;
}

/* Modals & UI Controls */
.game-modal {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #000;
  background: #fff;
  border: 3px solid #000;
  padding: 20px 30px;
  border-radius: 0;
  box-shadow: none;
  font-family: 'Open Sans', sans-serif;
}

#helpModal {
  text-align: left;
  z-index: 1001;
  max-width: 450px;
  font-size: 15px;
  line-height: 1.5;
}

#gameOverModal {
  text-align: center;
  z-index: 1000;
  max-width: 320px;
  font-size: 16px;
  max-height: 80vh;
  overflow-y: auto;
  line-height: 1.4;
}

.game-modal h2 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #000;
  text-align: center;
}

.modal-content-left {
  text-align: left;
}

.modal-section {
  margin-bottom: 15px;
}

.modal-text-compact {
  margin-top: 0;
  margin-bottom: 5px;
}

.modal-text-spaced {
  margin: 5px 0;
}

.modal-list {
  padding-left: 20px;
  margin: 0;
}

.modal-divider {
  border-color: #000;
  margin: 10px 0;
}

.modal-btn {
  color: #000;
  background-color: #fff;
  border: 2px solid #000;
  padding: 10px 20px;
  border-radius: 0;
  cursor: pointer;
  align-self: center;
  font-weight: bold;
}

.modal-btn:hover {
  background-color: #000;
  color: #fff;
}

#closeHelpButton {
  font-size: 16px;
  margin-top: 10px;
}

#restartButton {
  font-size: 18px;
  margin-top: 20px;
}

/* Help Button Trigger */
#helpTriggerButton {
  display: block;
  margin: 15px auto 0 auto;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: bold;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  cursor: pointer;
}

#helpTriggerButton:hover {
  background: #000;
  color: #fff;
}


.arcade-mode .runner-container {
  transition: transform 250ms cubic-bezier(0.4, 0.0, 1, 1) .4s;
}

.game-modal a {
  color: #000;
  text-decoration: underline;
  font-weight: bold;
}

.game-modal a:hover {
  color: #535353;
}