/*
 * Copyright 2016 Google Inc.
 * 
 * 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.
 */

* {
    box-sizing: border-box;
}

html,
body {
    padding: 0;
    margin: 0;
    height: 100%;
    width: 100%;
    font-family: "Helvetica", "Arial", sans-serif;
    font-weight: 400;
    color: #444;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html {
    overflow: hidden;
}

body {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    -ms-flex-line-pack: stretch;
    align-content: stretch;
    background: #ececec;
}

h1,
h2,
h3,
h4 {
    font-family: "Helvetica", "Arial", sans-serif;
    font-weight: bold;
    font-style: normal;
    font-stretch: normal;
    color: #333333;
}

h1 {
    font-size: 32px;
    letter-spacing: 0.25px;
}

h2 {
    font-size: 28px;
    letter-spacing: 0.25px;
}

h3 {
    font-size: 26px;
    letter-spacing: 0px;
}

h4 {
    font-size: 22px;
    letter-spacing: 0px;
}

.header {
    width: 100%;
    height: 56px;
    color: #FFF;
    background: #3F51B5;
    position: fixed;
    font-size: 20px;
    box-shadow: 0 4px 5px 0 rgba(0, 0, 0, 0.14), 0 2px 9px 1px rgba(0, 0, 0, 0.12), 0 4px 2px -2px rgba(0, 0, 0, 0.2);
    padding: 16px 16px 0 16px;
    will-change: transform;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    -webkit-box-align: stretch;
    -ms-flex-align: stretch;
    align-items: stretch;
    -ms-flex-line-pack: center;
    align-content: center;
    -webkit-transition: -webkit-transform 0.233s cubic-bezier(0, 0, 0.21, 1) 0.1s;
    transition: -webkit-transform 0.233s cubic-bezier(0, 0, 0.21, 1) 0.1s;
    transition: transform 0.233s cubic-bezier(0, 0, 0.21, 1) 0.1s;
    transition: transform 0.233s cubic-bezier(0, 0, 0.21, 1) 0.1s, -webkit-transform 0.233s cubic-bezier(0, 0, 0.21, 1) 0.1s;
    z-index: 1000;
}

.header .headerButton {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    text-indent: -30000px;
    overflow: hidden;
    opacity: 0.54;
    -webkit-transition: opacity 0.333s cubic-bezier(0, 0, 0.21, 1);
    transition: opacity 0.333s cubic-bezier(0, 0, 0.21, 1);
    border: none;
    outline: none;
    cursor: pointer;
}

.header #butRefresh {
    background: url(/images/ic_refresh_white_24px.svg) center center no-repeat;
}

.header #butAdd {
    background: url(/images/ic_add_white_24px.svg) center center no-repeat;
}

.header__title {
    font-weight: 400;
    font-size: 20px;
    margin: 0;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

.loader {
    left: 50%;
    top: 50%;
    position: fixed;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.loader #spinner {
    box-sizing: border-box;
    stroke: #673AB7;
    stroke-width: 3px;
    -webkit-transform-origin: 50%;
    transform-origin: 50%;
    -webkit-animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite;
    animation: line 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite, rotate 1.6s linear infinite;
}

@-webkit-keyframes rotate {
    from {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }
    to {
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}

@keyframes rotate {
    from {
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }
    to {
        -webkit-transform: rotate(450deg);
        transform: rotate(450deg);
    }
}

@-webkit-keyframes line {
    0% {
        stroke-dasharray: 2, 85.964;
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }
    50% {
        stroke-dasharray: 65.973, 21.9911;
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dasharray: 2, 85.964;
        stroke-dashoffset: -65.973;
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
}

@keyframes line {
    0% {
        stroke-dasharray: 2, 85.964;
        -webkit-transform: rotate(0);
        transform: rotate(0);
    }
    50% {
        stroke-dasharray: 65.973, 21.9911;
        stroke-dashoffset: 0;
    }
    100% {
        stroke-dasharray: 2, 85.964;
        stroke-dashoffset: -65.973;
        -webkit-transform: rotate(90deg);
        transform: rotate(90deg);
    }
}

.main {
    padding-top: 60px;
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.dialog-container {
    background: rgba(0, 0, 0, 0.57);
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    will-change: opacity;
    -webkit-transition: opacity 0.333s cubic-bezier(0, 0, 0.21, 1);
    transition: opacity 0.333s cubic-bezier(0, 0, 0.21, 1);
}

.dialog-container--visible {
    opacity: 1;
    pointer-events: auto;
}

.dialog {
    background: #FFF;
    border-radius: 2px;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.24), 0 14px 28px rgba(0, 0, 0, 0.48);
    min-width: 280px;
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%) translateY(30px);
    transform: translate(-50%, -50%) translateY(30px);
    -webkit-transition: -webkit-transform 0.333s cubic-bezier(0, 0, 0.21, 1) 0.05s;
    transition: -webkit-transform 0.333s cubic-bezier(0, 0, 0.21, 1) 0.05s;
    transition: transform 0.333s cubic-bezier(0, 0, 0.21, 1) 0.05s;
    transition: transform 0.333s cubic-bezier(0, 0, 0.21, 1) 0.05s, -webkit-transform 0.333s cubic-bezier(0, 0, 0.21, 1) 0.05s;
}

.dialog>div {
    padding-left: 24px;
    padding-right: 24px;
}

.dialog-title {
    padding-top: 20px;
    font-size: 1.25em;
}

.dialog-body {
    padding-top: 20px;
    padding-bottom: 24px;
}

.dialog-body select {
    width: 100%;
    font-size: 2em;
}

.dialog-buttons {
    padding: 8px !important;
    float: right;
}

.card {
    padding: 16px;
    position: relative;
    box-sizing: border-box;
    background: #fff;
    border-radius: 2px;
    margin: 16px;
    box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2), 0 1px 5px 0 rgba(0, 0, 0, 0.12);
}

.mdl-button {
    background: transparent;
    border: none;
    border-radius: 2px;
    color: black;
    position: relative;
    height: 36px;
    margin: 0;
    min-width: 64px;
    padding: 0 16px;
    display: inline-block;
    font-family: "Roboto", "Helvetica", "Arial", sans-serif;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0;
    overflow: hidden;
    will-change: box-shadow;
    -webkit-transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    transition: box-shadow 0.2s cubic-bezier(0.4, 0, 1, 1), background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 36px;
    vertical-align: middle;
}

.mdl-button::-moz-focus-inner {
    border: 0;
}

.mdl-button:hover {
    background-color: rgba(158, 158, 158, 0.2);
}

.mdl-button:focus:not(:active) {
    background-color: rgba(0, 0, 0, 0.12);
}

.mdl-button:active {
    background-color: rgba(158, 158, 158, 0.4);
}

.mdl-button.mdl-button--colored {
    color: #3f51b5;
}

.mdl-button.mdl-button--colored:focus:not(:active) {
    background-color: rgba(0, 0, 0, 0.12);
}

.mdl-button--primary.mdl-button--primary {
    color: #3f51b5;
}

.mdl-button--primary.mdl-button--primary .mdl-ripple {
    background: white;
}

.mdl-button--primary.mdl-button--primary.mdl-button--raised,
.mdl-button--primary.mdl-button--primary.mdl-button--fab {
    color: white;
    background-color: #3f51b5;
}

.padding-20 {
    padding: 2% 2%;
}

.center {
    margin: 0 auto;
    display: block;
}

.text-center {
    text-align: center;
}

.flexbox {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    align-items: flex-start;
}


/*File Upload*/

.upload .image-container {
    float: left;
    margin: 10px;
    width: 140px;
    height: 140px;
    position: relative;
}

.upload output#result .image-container i {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0;
    transition: 0.7s;
}

.upload output#result .image-container:hover i {
    opacity: 1;
}

.upload output#result .image-container i:hover {
    display: block;
    cursor: pointer;
}

.upload .image-container .thumbnail {
    position: relative;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: auto;
    height: auto;
    max-height: 100%;
    max-width: 100%;
    display: block;
    margin: 0 auto;
}

.upload #clear {
    display: none;
}

.upload #result {
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: start;
    -ms-flex-pack: start;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.thumb {
    height: 75px;
    border: 1px solid #000;
    margin: 10px 5px 0 0;
}

button#clear {
    margin-top: 20px;
}

#image-upload-panel {
    height: auto;
    min-height: 100%;
}


/*css page transitions*/

.panel {
    min-width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    position: absolute;
    margin-top: -150%;
    box-shadow: 0px 4px 7px rgba(0, 0, 0, 0.6);
    opacity: 0;
    z-index: 2;
    /*-webkit-transition: opacity .6s ease-in-out;
    -moz-transition: opacity .6s ease-in-out;
    -o-transition: opacity .6s ease-in-out;
    -ms-transition: opacity .6s ease-in-out;
    transition: opacity .6s ease-in-out;*/
}

.panel:target {
    opacity: 1;
    margin-top: 0%;
}

.home-tile {
    position: absolute;
    left: 0;
    right: 0;
    margin: auto;
}


/*GPS PAGE*/

#gps-panel .upload .store-choice .alternate-store {
    position: relative!important;
    text-align: left;
}

#gps-details {
    margin-bottom: 20px;
    text-align: center;
}

.store-choice {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.store-choice a {
    flex-basis: 20%;
    box-shadow: inset 0 0 0 1px #000;
    width: 320px !important;
    margin: 0 auto;
    padding: 2%;
    display: block;
    color: #424242;
    text-decoration: none;
    margin-bottom: 20px;
    margin-top: 20px;
}

.store-choice a:hover {
    cursor: pointer;
}

.selected {
    box-shadow: inset 0 0 0 2px #007bda!important;
}


/*FOR DEMO*/

#camera-panel-reveal div,
#gps-panel .demo-content,
#confirmation .demo-content {
    width: 70%;
    position: relative;
    margin: 0 auto;
}

#gps-panel .demo-content,
#cart-panel .demo-content {
    position: inherit!important;
    left: 0;
    right: 0;
    margin: 0 auto;
}

.your-store .selected div {
    box-shadow: inset 0 0 0 1px #000;
    width: 300px;
    padding: 10px;
    color: #000;
}

.your-store {
    margin-bottom: 20px;
}

.control-group {
    margin-bottom: 20px;
}

.order-intro {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
}

div#confirmation {
    text-align: center;
}

div#confirmation article {
    font-size: 30px;
}


/*COSTCO*/

body main .mdl-color--grey-100 {
    background-color: #ededed!important;
}

.costco-btn {
    background: transparent;
    border: none;
    color: #FFF;
    position: relative;
    width: 200px;
    height: 50px;
    margin: 0;
    min-width: 50px;
    padding: 16px 30px;
    display: inline-block;
    font-family: "Helvetica", "Arial", sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    line-height: 1;
    letter-spacing: 0;
    overflow: hidden;
    outline: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
}

.white-text {
    color: #FFF;
}

.normal-text {
    color: #333;
}

.costco-primary {
    background-color: #0060A8;
}

.costco-primary-white {
    background-color: #FFF;
}

.costco-primary-orange {
    background-color: #f69d38;
}

.costco-primary-green {
    background-color: #197b30;
}

.costco-title {
    font-size: 32px;
    font-weight: bold;
    letter-spacing: 0.25;
    font-family: "Helvetica", "Arial", sans-serif;
}

.logo-top {
    display: inline-block;
    height: 100%;
}

.logo-top img {
    height: 100%;
    width: auto;
}


/*Media Queries*/

@media (max-width:1024px) {
    .flexbox a {
        display: inline-block;
        width: 45%;
    }
    .flexbox a button {
        width: 100%;
    }
    .logo-top {
        margin: 0 auto;
    }
    .mdl-layout__header-row {
        padding: 0;
        width: 100%;
    }
    .upload #result {
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }
}

#myImg {
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
}

#myImg:hover {
    opacity: 0.7;
}


/* The Modal (background) */

.modal {
    display: none;
    /* Hidden by default */
    visibility: hidden;
    position: fixed;
    /* Stay in place */
    z-index: 1;
    /* Sit on top */
    padding-top: 100px;
    /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
}


/* Modal Content (image) */

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
}


/* Caption of Modal Image */

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
}


/* Add Animation */

.modal-content,
#caption {
    -webkit-animation-name: zoom;
    -webkit-animation-duration: 0.6s;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
    from {
        -webkit-transform: scale(0)
    }
    to {
        -webkit-transform: scale(1)
    }
}

@keyframes zoom {
    from {
        transform: scale(0)
    }
    to {
        transform: scale(1)
    }
}


/* The Close Button */

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}


/* 100% Image Width on Smaller Screens */

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}

@media (max-width:480px) {
    #camera-panel-reveal div,
    #gps-panel .demo-content,
    #confirmation .demo-content {
        width: calc(100% - 16px);
    }
}