/*
 * Copyright 2018 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

body {
  font: 13px 'Roboto', 'Noto', sans-serif;
  line-height: 1.5;
  --app-primary-color: #202020;
  --app-secondary-color: #757575;
  --app-accent-color: #172c50;
  --paper-button-ink-color: var(--app-accent-color);
  --paper-icon-button-ink-color: var(--app-accent-color);
  --paper-spinner-color: var(--app-accent-color);
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  color: var(--app-primary-color);
  margin: 0;
  padding: 0 0 2em 0;
}

img {
  position: var(--layout-fit_-_position);
  top: var(--layout-fit_-_top);
  right: var(--layout-fit_-_right);
  bottom: var(--layout-fit_-_bottom);
  left: var(--layout-fit_-_left);
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  opacity: 0;
  transition: .5s opacity;
  position: var(--shop-image-img_-_position, var(--layout-fit_-_position));
  top: var(--shop-image-img_-_top, var(--layout-fit_-_top));
  bottom: var(--shop-image-img_-_bottom, var(--layout-fit_-_bottom));
  left: var(--shop-image-img_-_left, var(--layout-fit_-_left));
  right: var(--shop-image-img_-_right, var(--layout-fit_-_right));
  max-width: var(--shop-image-img_-_max-width, 100%);
}

[hidden] {
  display: none !important;
}

#header {
  overflow: hidden;
  background-color: #f1f1f1;
  padding: 20px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#header a {
  color: #555;
  text-align: center;
  padding: 12px;
  text-decoration: none;
  font-size: 16px;
  line-height: 25px;
  border-radius: 4px;
}

#header a.logo {
  color: #777;
  font-size: 25px;
  font-weight: 100;
  vertical-align: middle;
}

#header a:hover {
  background-color: #ddd;
  color: black;
}

#header a.active {
  background-color: dodgerblue;
  color: white;
}

#header-left {
  float: left;
  margin-left: 15px;
  margin-right: 15px;
}

#header-left img {
  vertical-align: middle;
}

#reload-button {
  cursor: pointer;
  padding: 10px;
  border-radius: 10px;
}

#reload-button:hover {
  background-color: #ddd;
}

#header-right {
  float: right;
  margin-right: 15px;
}

#content {
  margin-top: 30px;
}

/* Add media queries for responsiveness - when the screen is 500px wide or less, stack the links on top of each other */
@media screen and (max-width: 500px) {
  .header a {
    float: none;
    display: block;
    text-align: left;
  }
  .header-right {
    float: none;
  }
}

shop-select {
  display: inline-block;
  position: relative;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

shop-select > shop-md-decorator {
  display: block;
  border-top: 1px solid #ccc;
  height: 1px;
  speak: none;
}

shop-select > shop-md-decorator::after {
  content: '\25bc';
  display: block;
  position: absolute;
  bottom: calc(50% - .75em);
  right: 8px;
  speak: none;
  -webkit-transform: scaleY(.6);
  transform: scaleY(.6);
  color: var(--app-secondary-color);
  pointer-events: none;
}

shop-select > select {
  width: 100%;
  font-size: 16px;
  padding: 16px 24px 16px 70px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border: none;
  background-color: transparent;
  border-radius: 0;
  font-weight: 300;
  color: var(--app-primary-color);
  overflow: hidden;
  margin: 0;
  outline: none;
}

shop-select > select::-ms-expand {
  display: none;
}

shop-select > shop-md-decorator > shop-underline {
  display: block;
  background-color: var(--app-accent-color);
  height: 2px;
  position: relative;
  top: -1px;
  width: 100%;
  margin: auto;
  -webkit-transform: scale3d(0, 1, 1);
  transform: scale3d(0, 1, 1);
  transition: -webkit-transform .2s ease-in;
  transition: transform .2s ease-in;
}

shop-select > select:focus + shop-md-decorator > shop-underline {
  -webkit-transform: scale3d(1, 1, 1);
  transform: scale3d(1, 1, 1);
  transition: -webkit-transform .2s ease-out;
  transition: transform .2s ease-out;
}

shop-select > select:focus + shop-md-decorator::before, shop-select > select:focus + shop-md-decorator::after, shop-select > select:focus {
  color: black;
}

shop-select > select:focus:-moz-focusring {
  color: transparent;
  text-shadow: 0 0 0 #000;
}

shop-select > [prefix] {
  position: absolute;
  left: 0px;
  top: calc(50% - 8px);
  line-height: 16px;
  color: var(--app-secondary-color);
  pointer-events: none;
}

#buy-now:not([visible]) {
  display: none;
}

#buy-now a.btn {
  display: block;
  width: 240px;
  text-decoration: none;
  text-align: center;
}

#shop-tshirt {
  display: flex;
  -ms-flex-direction: normal;
  -webkit-flex-direction: row;
  flex-direction: row;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
}

#shop-image {
  max-height: 100%;
  margin: 0 auto;
}

#shop-image-container {
  position: relative;
  margin: 64px 32px;
  width: 50%;
  min-height: 332px;
  max-width: 450px;
  overflow: hidden;
}

#shop-image::before {
  content: '';
  display: block;
  padding-top: 100%;
}

.detail {
  margin: 64px 32px;
  width: 50%;
  max-width: 400px;
  transition: opacity .4s;
  opacity: 0;
}

.detail[has-content] {
  opacity: 1;
}

h1 {
  font-size: 24px;
  font-weight: 500;
  line-height: 28px;
  margin: 0;
}

.price {
  margin: 16px 0 40px;
  font-size: 16px;
  color: var(--app-secondary-color);
}

.description {
  margin: 32px 0;
}

.description > h2 {
  margin: 16px 0;
  font-size: 13px;
}

.description > * {
  margin: 0;
  color: var(--app-secondary-color);
}

.pickers {
  border-top: 1px solid #ccc;
  flex-direction: column;
  display: flex;
}

#loading {
  width: 118px;
  height: 90px;
  background-position: center center;
}

#loading img {
  max-width: 118px;
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  margin: auto;
  text-align: center;
  vertical-align: middle;
}

.row {
  display: -ms-flexbox; /* IE10 */
  display: flex;
  -ms-flex-wrap: wrap; /* IE10 */
  flex-wrap: wrap;
  margin: 0 -16px;
}

.col-25 {
  -ms-flex: 25%; /* IE10 */
  flex: 25%;
}

.col-50 {
  -ms-flex: 50%; /* IE10 */
  flex: 50%;
}

.col-75 {
  -ms-flex: 75%; /* IE10 */
  flex: 75%;
}

.col-25,
.col-50,
.col-75 {
  padding: 0 16px;
}

.page-container {
  margin: 1em auto;
  background-color: #f2f2f2;
  padding: 5px 20px 15px 20px;
  border: 1px solid lightgrey;
  border-radius: 3px;
}

input[type=text] {
  width: 90%;
  margin-bottom: 20px;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 3px;
}

label {
  margin-bottom: 10px;
  display: block;
}

.icon-container {
  margin-bottom: 20px;
  padding: 7px 0;
  font-size: 24px;
}

.btn {
  background-color: #4caf50;
  color: white;
  padding: 10px 0px;
  margin: 8px 0;
  border: none;
  width: 100%;
  border-radius: 3px;
  cursor: pointer;
  font-size: 17px;
}

.btn:hover {
  background-color: #45a049;
}

span.price {
  float: right;
  color: grey;
}

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

  #shop-tshirt {
    align-content: normal;
    align-self: auto;
    display: flex;
    -ms-flex-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    align-items: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    justify-content: center;
  }

  .detail {
    box-sizing: border-box;
    margin: 32px 0;
    padding: 0 24px;
    width: 100%;
    max-width: 600px;
  }

  h1 {
    font-size: 20px;
    line-height: 24px;
  }

  #shop-image-container {
    margin: 80px 20px 20px 20px;
    width: 80%;
  }

  .price {
    font-size: inherit;
    margin: 12px 0 32px;
  }

  #buy-now a.btn, #google-pay-button button {
    width: 100%;
  }

  shop-button[responsive]#buy-now > * {
    background-color: var(--app-secondary-color);
  }
}
