@import 'fonts.css';

* {
  box-sizing: border-box;
  font-family: 'Burbank', 'Roboto', 'Segoe UI', sans-serif;
  outline: none;
}

html, body {
  background-color: #fff;
  color: #222;
  font-size: 18px;
}

a { color: #38e; }

button {
  padding: 12px 36px;
  background: #38e;
  border: 0;
  border-radius: 2px;
  color: #fff;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.app {
  position: relative;
  left: 0;
  transition: left 250ms ease;
  width: 100%;
  margin: auto;
}

/* COMMON */
.hidden, [hidden] {
  display: none !important;
}

.debug {
  position: fixed;
  top: 50px;
  left: 4px;
  z-index: 1001;
}

.fullscreen {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden !important;
  z-index: 998;
}

.centered {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  text-align: center;
}

#alert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%;
  background: #fff;
  padding: 20px;
  border-radius: 5px;
  z-index: 12;
}

.alert-message {
  padding-bottom: 42px;
  text-align: center;
}

.alert-buttons {
  margin-top: 12px;
  text-align: center;
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
}

.alert-buttons button {}

.inactive,
.inactive * {
  -webkit-user-drag: none !important;
  -webkit-user-select: none !important;
  -khtml-user-select: none !important;
  -moz-user-select: none !important;
  -o-user-select: none !important;
  user-select: none !important;
}

.lens {
  position: fixed;
  top: 0;
  left: 0;
  right: 200%;
  bottom: 200%;
  background: rgba(0,0,0, 0.25);
  z-index: 10;
  opacity: 0;
  transition: opacity 200ms ease-in;
}

.lens.open {
  right: 0;
  bottom: 0;
  opacity: 1;
}

.bounds-text {
  position: absolute;
  left: -10px;
  top: -75px;
  margin-left: 10px;
  background: #ff0;
  color: #000;
  padding: 5px;
  border: 1px solid #555;
  font-size: 16px;
}

/* LOADER */
.loading {
  width: 64px;
  height: 64px;
  border: 5px solid #38e;
  border-bottom-color: #3ee;
  border-radius: 100%;
  margin: auto;
  animation: spinning 600ms linear infinite;
  box-shadow: 3px 3px 5px 0 #3ee;
}

.loading-container {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  margin: auto;
  z-index: 11;
}

.loading-message {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50%;
  min-height: 64px;
  z-index: 11;
}

.loading-message.open {
  display: block;
}

.loading-text {
  text-align: center;
  margin-top: 10px;
}

#loading-container .loading {
  box-shadow: 0 0 10px 12px #fff !important;
}

#loading-container .loading-text {
  text-shadow: 0 0 20px #fff !important;
}

.banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 50px;
  background: #eee;
}

.page-title-container {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  bottom: 0;
  text-align: center;
  transform: translateY(-50%);
}

.page-title {
  display: inline-block;
  font-size: 1.5rem;
  pointer-events: none;
}

.updated-icon {
  position: fixed;
  top: 9px;
  right: 36px;
  width: 32px;
  height: 32px;
  background-color: #ccc;
  border-radius: 100%;
  box-shadow: 0 2px 3px rgb(0,0,0, 0.25) inset;
}

.updated-icon:after {
  content: '';
  display: block;
  position: relative;
  top: 50%;
  left: 50%;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  background: #7bffb4;
  border-radius: 100%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 2px rgb(0,0,0, 0.75) inset;
}

/* SWITCHES */
.onoffswitch {
  display: inline-block;
  position: relative;
  width: 40px;
  -webkit-user-select:none; -moz-user-select:none; -ms-user-select: none;
}
.onoffswitch-checkbox {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.onoffswitch-label {
  display: block; overflow: hidden; cursor: pointer;
  height: 20px; padding: 0; line-height: 20px;
  border: 2px solid #E3E3E3; border-radius: 20px;
  background-color: #fff;
  transition: background-color 0.3s ease-in;
}
.onoffswitch-label:before {
  content: "";
  display: block; width: 20px; margin: 0px;
  background: #fff;
  position: absolute; top: 0; bottom: 0;
  right: 18px;
  border: 2px solid #E3E3E3; border-radius: 20px;
  transition: all 0.3s ease-in 0s;
}
.onoffswitch-checkbox:checked + .onoffswitch-label {
  background-color: #38e;
}
.onoffswitch-checkbox:checked + .onoffswitch-label, .onoffswitch-checkbox:checked + .onoffswitch-label:before {
 border-color: #38e;
}
.onoffswitch-checkbox:checked + .onoffswitch-label:before {
  right: 0px;
}

/* MENU */
.menu {
  position: fixed;
  left: calc(-90% - 20px);
  top: 50px;
  bottom: 0;
  width: 90%;
  background: #fafafa;
  transition: left 250ms ease;
  box-shadow: 0 10px 10px 5px rgba(0,0,0, 0.25);
  z-index: 11;
}

.menu.open {
  left: 0;
}

.menu-list .menu-item {
  padding: 20px 10px;
  margin: 0;
}

.menu-list .menu-item:nth-child(odd) {
  background: #f5f5f5;
}

.menu-list .menu-item label {
  vertical-align: middle;
}

.icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}

.toggle-menu {
  position: fixed;
  left: -20px;
  border: none;
  background: none;
  font-size: 1.25rem;
  line-height: 1.25;
  width: 32px;
  z-index: 11;
  color: #222;
}

.toggle-menu:after {
  content: '☰';
}

.menu-open .toggle-menu:after {
  content: '×';
  font-size: 2rem;
  line-height: 0.8;
  margin-left: 4px;
}

/* CONTENT */
.content {
  position: fixed;
  top: 50px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
}

.content.dim {
  overflow: hidden;
}

.menu-open .content:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0, 0.35);
}

/* PAGES */
.page {
  display: none;
  position: absolute;
  top: 0;
  right: 100%;
  width: 100%;
  min-height: 100%;
  background: #fff;
  padding: 10px 10px 0;
}

.page.is-animated {
  transition: right 250ms ease;
}

.page.open {
  display: block;
  right: 0;
}

.page-heading {
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
  margin: 10px auto;
}

.page-tools {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  z-index: 10;
}

.page-tools.open {
  display: inline-block;
}

.in-these-stores {
  padding-top: 8px;
}

/** Splash page */
.page-splash {
  background: #fff;
  color: #38e;
  padding: 0;
}

.page-splash .loading-container {
  margin-top: -32px;
}

.splash-title {
  font-size: 64px;
  text-align: center;
}

.splash-text {
  text-align: center;
  margin-top: 10px;
}

/** Error page */
.page-error {
  background: #000;
  color: #e33;
}

.error-title {
  font-size: 64px;
  text-align: center;
}

.error-icon {
  position: relative;
  top: -8px;
  font-size: 64px;
  text-align: center;
  line-height: 1;
}

.error-text {
  text-align: center;
  margin-top: 10px;
}

/** Home page */
.page-home {
  padding-top: 60px;
}

.page-home .barcode-link {
  position: fixed;
  top: 60px;
  left: 10px;
  width: calc(100% - 20px);
  font-size: 1rem;
  box-shadow: 0 0 10px 8px #fff;
  z-index: 8;
}

.page-home #results-list {
  width: 100%;
  margin: 0;
  list-style: none;
  text-align: left;
  padding: 0;
}

.page-home #results-list > li {
  display: inline-block;
  position: relative;
  width: 100%;
  height: auto;
  font-size: 1rem;
  padding: 12px 8px;
  transition: all 500ms ease;
  vertical-align: top;
}

.page-home .product-image img {
  width: 100%;
  min-height: 400px;
}

.page-home .product-name {
  font-size: 1.4em;
}

.store {
  margin: 6px 0;
  padding: 4px;
}

.store:nth-child(odd) {
  background: #fafafa;
}

.store-info,
.store-number,
.store-name,
.store-address,
.store-phone {
  display: block;
}

.product-list-price {
  color: #999;
  text-decoration: line-through;
}

.page-home .caption {
  letter-spacing: 0;
  margin-top: 4px;
}

.quick-setting {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
  background: #fff;
  padding: 20px;
  box-shadow: 0 0 100px 50px rgba(0,0,0, 0.5);
  border-radius: 2px;
  z-index: 12;
}

.quick-setting.open {
  display: block;
}

.quick-setting:before {
  position: fixed;
  top: 12px;
  right: 12px;
  content: '\f057';
  font-family: "Font Awesome 5 Pro";
  font-size: 30px;
  background: #ffe4e4;
  border-radius: 100%;
  line-height: 25px;
  color: #333;
  letter-spacing: -1px;
}

.quick-setting .heading {
  margin: 0;
  text-align: center;
}

.quick-setting .option {
  padding: 10px 0;
}

.quick-setting .option > * {
  vertical-align: middle;
}

.expander-container {
  position: relative;
}

.expander {
  height: 0;
  overflow: hidden;
  transition: all 200ms ease;
  box-shadow: 0 3px #ddd;
  border-bottom: 3px solid #fff;
  padding-left: 10px;
}

.expander.open {
  height: auto;
  overflow: auto;
}

.expander-container:after {
  content: '\f0d7';
  position: absolute;
  right: 0;
  bottom: 0;
  font-family: "Font Awesome 5 Pro";
  color: #ccc;
}

.expander-container.open:after {
  content: '\f0d8';
  position: absolute;
  right: 0;
  bottom: 0;
  font-family: "Font Awesome 5 Pro";
  color: #ccc;
}

/** Barcode Scanner page */
#barcode-canvas {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  border: 2px solid #f00;
}

#barcode-status {
  text-align: center;
}

.sku-input-form {
  width: 100%;
  margin: 24px 0 0;
  text-align: center;
}

.sku-input-form .form-group label[for="sku-input"] {
  left: 12px;
}

#sku-input {
  display: inline-block;
  width: 75%;
  margin-right: 8px;
  text-align: center;
}

.sku-input-button {
  padding: 12px 24px;
  vertical-align: bottom;
}

/** Product Details page */
.page-product-details #product-details {
  margin: 0 4px;
}

.page-product-details #product-image {
  display: block;
  margin: auto;
}

.page-product-details #online-price {
  height: 32px;
  font-size: 1.5rem;
  line-height: 2.25rem;
}

.page-product-details #online-price:empty:after {
  content: 'Nothing found yet...';
  position: absolute;
  top: calc(50% + 48px);
  left: 0;
  right: 0;
  text-align: center;
  transform: translateY(-50%);
}

.page-product-details .stores {
  margin-top: 12px;
}

.page-product-details .stores .store {
  padding: 6px 0;
  border-top: 2px solid #eee;
}

.page-product-details .pdp-link {
  float: right;
  font-size: 1rem;
  height: 32px;
  padding: 2px 16px;
}

.badge { background: #ccc; color: #444; padding: 3px 4px 0; border-radius: 3px; text-shadow: 0 0 3px #777; text-transform: uppercase; font-size: 0.8em; cursor: default; }
.percent-off { background: #080; color: #fff; }
.percent-off:after { content: '% OFF'; }
.in-stock { background: #080; color: #fff; }
.out-of-stock { background: #f00; color: #fff; }
.limited-stock { background: #fa0; color; #fff; }
.caption { font-size: 0.75em; color: #777; }

/** About page */
.page-about {
  text-align: center;
}

.page-controls {
  position: fixed;
  top: 60px;
  right: 30px;
}

.page-control {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: #ccc;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0px 1px 2px 1px rgba(0,0,0, 0.5);
  user-select: none;
}

.page-left {
  margin-right: 5px;
}

.zoom-controls {
  position: fixed;
  bottom: 1%;
  right: 50%;
  height: 40px;
  transform: translateX(50%);
  line-height: 40px;
}

.zoom-controls .zoom-control {
  position: relative;
  display: inline-block;
  width: 45px;
  height: 100%;
  background: #ccc;
  font-size: 1.2em;
}

.zoom-control.zoom-out {
  left: 0;
  border-top-left-radius: 50%;
  border-bottom-left-radius: 50%;
}

.zoom-control.zoom-out:after {
  content: '--';
  letter-spacing: -2px;
}

.zoom-control.zoom-in {
  right: 0;
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}

.zoom-control.zoom-in:after {
  content: '+';
}

.zoom-control:after {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.back-to-top {
  position: fixed;
  right: -100%;
  bottom: 10px;
  background: #ccc;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  transition: opacity 300ms ease, box-shadow 300ms ease;
  opacity: 0;
}

.has-scroll .back-to-top {
  right: 2.5%;
  opacity: 1;
  box-shadow: 0px 1px 2px 1px rgba(0,0,0, 0.5);
}

.back-to-top:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-left: 8px solid transparent;
  border-top: 0;
  border-bottom: 10px solid #555;
  border-right: 8px solid transparent;
}

/** Service Manuals page */
.page-tsrm {
  padding: 0;
}

/** Service Manual Detail page */
.page-container {
  position: relative;
  border-bottom: 1px solid #ccc;
}

.manual-content-link {
  position: absolute;
  left: -100%;
  background: #f00;
  opacity: 0.5;
  cursor: pointer;
}

/** Modeler page */
.page-modeler {
  padding: 0;
}

#modeler-frame {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/** Settings page */
.page-settings {
  padding-top: 0;
}

.page-settings .form-group {
  margin: 30px auto;
}

/** Forms */
.form-group {
  position: relative;
  width: 94%;
  margin: 10px auto;
}

form input {
  display: block;
  width: 100%;
  font-size: 1.5rem;
  border: 0;
  border-bottom: 1px solid #ccc;
  transition: border-color 300ms ease;
  padding-bottom: 1px;
}

form input:focus {
  border-bottom: 2px solid #38e;
  padding-bottom: 0;
}

form input[type="radio"] {
  width: auto;
  display: inline;
}

.form-group label {
  position: absolute;
  left: 0;
  top: 3px;
  font-size: 1.5rem;
  transition: top 300ms ease;
  z-index: 1;
}

form input:not(:placeholder-shown) ~ label {
  top: 38px;
  font-size: 0.6rem;
}

/* Animations */
@keyframes spinning {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}