/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you 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.
 */


/*@font-face {
    font-family: DroidSans;
    src: url("../fonts/DroidSans/DroidSans.ttf");
}

@font-face {
    font-family: Share;
    src: url("../fonts/Share/Share-Regular.ttf");
}*/

@font-face {
    font-family: Roboto;
    src: url("../fonts/Roboto/Roboto-Regular.ttf");
}

::-webkit-scrollbar { 
    display: none; 
}

* {
    -webkit-tap-highlight-color: rgba(0,0,0,0); /* make transparent link selection, adjust last value opacity 0 to 1.0 */
}

body {
    -webkit-touch-callout: none;                /* prevent callout to copy image, etc when tap to hold */
    -webkit-text-size-adjust: none;             /* prevent webkit from resizing text to fit */
    -webkit-user-select: none;                  /* prevent copy paste, to allow, change 'none' to 'text' */

    background-color:#000000;
    background-attachment:fixed;
/*    font-family:'HelveticaNeue-Light', 'HelveticaNeue', Helvetica, Arial, sans-serif;
*/  
    font-family: Roboto;
    font-size: 4vw;
    height:100%;
    margin:0px;
    padding:0px;
    width:100%;
    color: white;
    overflow: hidden;
}

html, body {
    height: 100%;
    overflow: hidden;
    margin: 0;
}

h1 {
    font-size:24px;
    font-weight:normal;
    margin:0px;
    overflow:visible;
    padding:0px;
    text-align:center;
}

.fullscreen {
    width: 100%;
    height: 100%; 
    position: absolute;
    left: 0px;
    top: 0px;
    opacity: 0;
}

#game, #splash, #title {
    display: none;
    overflow: hidden;
}

#title-canvas {
    position:absolute;
    top: 0px;
    left: 0px;
}

#starfield {
    background-size: 100% auto;
}

#causa-logo, #gold-extra-logo, #headphones-logo {
    background-size: 100%;
    position: absolute;
    left: 50%;
    top: 50%;
}

#causa-logo {
    width: 70vw;
    height: 70vw;
    margin-left: -35vw;
    margin-top: -42vw;
    opacity: 0;
}

#end {
    background-color: #F0F0F0;
    color: black;
    opacity: 1.0;
}

#end-watermark {
    opacity: 0.075;
    position: absolute;
    left: 50%;
    top: 60%;
    margin-left: -100vw;
    margin-top: -100vw;
    width: 200vw;
    height: 200vw;
    background-image: url("../img/end-station.png");
    background-size: cover;    
}

#end-station-title {
    position: absolute;
    left: 50%;
    top: 48%;
    margin-left: -30vw;
    margin-top: -7.5vw;
    width: 60vw;
    height: 15vw;
    background-image: url("../img/end-station-title.png");
    background-size: cover;        
}

#gold-extra-logo {
    width: 60vw;
    height: 30vw;
    margin-left: -30vw;
    margin-top: -15vw;
    opacity: 1;
}

#headphones-logo {
    width: 30vw;
    height: 30vw;
    margin-left: -15vw;
    margin-top: -20vw;
    opacity: 1;    
}

#headphones-text {
    text-align: center;
    position: absolute;
    top: 50%;
    width: 100%;
    height: 2vw;
    margin-top: 13vw;
}


#title-placeholder, #game-placeholder, #credits-placeholder {
    text-align: center;
    position: absolute;
    top: 50%;
    width: 100%;
    height: 0.2vw;
    margin-top: -0.1vw;
}

@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
    #causa-logo {
        width: 70vh;
        height: 70vh;
        margin-left: -35vh;
        margin-top: -42vh;
    }
}

#game-main, #menu, #credits, #audio-tests, #chapter-selection, #map, .endscreen {
    position: absolute;
    top: 10vw;
    left: 0vw; /* was 5 */
    width: 80vw;
    height: calc(100vh - 20vw);
    font-size: 4.5vw;
    overflow: scroll;
    padding-top: 1vw;
    padding-left: 10vw;
    padding-right: 10vw;
    -webkit-overflow-scrolling: touch;
}

#mapimg {
    position: absolute;
    top: 50%;
    width: 80vw;
    height: 80vw;
    opacity: 0.7;
    margin-top: -40vw;
}


.endscreen {
    overflow: hidden !important;
}

#game-main {
    font-size: 100%;
}

#game-main, #chapter-selection {
    -webkit-mask-box-image: url("../img/text-mask.png") 64 stretch;
}

#game-main div:last-child, #game-main ul:last-child {
    margin-bottom: 100vw !important;
} 

#game p {
    color: #DDDDDD;
    hyphens: auto;
    text-align: left;
   -webkit-hyphens: auto;
   line-height: 150%;
}

#game-main div.node-text p {
    margin-top: 0px;
    margin-bottom: 0.5em;
    text-indent: 8%;
}

#game-main div.node-text p:first-child {
    text-indent: 0% !important;
}

#game-main div.chapter-marker:first-child, #game-main div.chapter-marker:nth-child(2) {
    margin-top: 1em;
}

#game-main div.mapbutton:first-child {
    margin-top: 1em;
}



#game-main div.node-text {
    margin-top: 1em;
    margin-bottom: 1em;
    clear: both;
}


@media screen and (min-aspect-ratio: 1/1) and (min-width:400px) {
    #game-main, #menu {
        top: 5vh;
        left: 0vw; /* was 10 */
/*        width: calc(100vw - 40vh);
*/        
        width: 80vw;
        height: 90vh;
        padding-left: 10vw;
        padding-right: 10vw;

        font-size: 4vw;
    }   
}

#menu, #credits, #audio-tests, #end {
/*    background-color: rgba(200, 200, 200, 0.2);
    border: 1px solid #CCCCCC;
    border-radius: 4px;*/
    overflow: hidden;
}

#chapter-selection {
    overflow-x:hidden;
}


#game p.old-action {
    color: #888888;
    font-style: italic;
    text-align: right;
    font-size: 80%;
    text-wrap: balanced;  /* Apply (proposed) CSS style */
    padding-right: 0.25em;
}

#game div.chapter-marker, #game div.mapbutton {
    font-size: 80%;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5em;
    background-color: rgba(255, 255, 255, 0.15); /* Config !! */
}

#game div.chapter-marker {
    padding-right: 2em;
    padding-left: 2em;
    width: 40%;
    margin-left: 0em;
}

#game div.mapbutton {
    float: right;
    padding-right: 2em;
    padding-left: 2em;
    margin-right: 0.5em;
    text-align: right;
}

#game div.chapter-help {
    opacity: 0.0;
    height: 1.4em;
    width: 1.4em;
    margin: 0 !important;
    margin-top: -0.2em !important;
    margin-right: 0.75em !important;
    background-image: url("../img/rewind.png");
    background-size: cover;
    float: right;
}

#game div.end-marker {
    font-size: 150%;
    margin-top: 1.5em;
    text-align: center;
    font-style: italic;
}

#game ul.options, .menu ul  {
    text-align: center;
    list-style-type: none;
    margin-top: 8vw;
    margin-bottom: 20vw;
}

#game ul.options li, .menu ul li {
    width: 80%;
    margin-bottom: 4vw;
    margin-left: 5vw;
    padding: 3vw;
    background-color: rgba(255, 255, 255, 0.15); /* Config !! */
    border: 1px solid #CCCCCC;
    box-shadow: 0px 0px 9px 0px rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    cursor: pointer;
    text-wrap: balanced;  /* Apply (proposed) CSS style */
}

/*#chapter-selection-content li {
   padding: 1vw !important;
}*/

/*#menu-chapter-select {
    font-family: Roboto;
    font-size: 4.5vw;
    -webkit-appearance: none;
    appearance: none;
    background:transparent;
    color: white;
    border: none;
    text-align: center;
    padding-left: 1.5em;
    padding-right: 1.5em;
    padding-top: 3vw;
    padding-bottom: 3vw;
}

#menu-chapter {
    padding-bottom: 0 !important;
    padding-top: 0 !important;
}

#menu-chapter-select option {
    text-align: center;
}*/

#menu-content, #chapter-selection-content {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

#chapter-selection-content {
    margin-top: 10vw !important;
    margin-bottom: 10vw !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

ul {
    -webkit-margin-before: 0em !important;
    -webkit-margin-after: 0em !important;
    -webkit-padding-start: 0px;
    list-style:none;
}

#game-background-canvas-1, #game-background-canvas-2 {
    opacity: 0;
    pointer-events: none;
}

#death {
    pointer-events: auto;
    background-color: black;
    display: none;
    opacity: 0.0;
}

#white {
    pointer-events: auto;
    background-color: white;
    display: none;
    opacity: 0.0;
}

#death-red {
    pointer-events: none;
    background-color: #330000;
    opacity: 0.0;
}

#cog-graphic {
    width:8vw;
    height:8vw;
    background-image: url("../img/cog.png");
    background-size: cover;
}

#cog {
    opacity: 0.0; /* Config */
    position: absolute;
    top:0vw;
    left:0vw;
    padding: 1vw;   
}

/* thick displays */

@media screen and (min-width:700px) {
    #game ul.options li, .menu ul li {
        border: 2px solid #CCCCCC;
        border-radius: 8px;
        box-shadow: 0px 0px 18px 0px rgba(255, 255, 255, 0.4);
    }

    #cog-graphic {
        width: 6vw !important;
        height: 6vw !important;
    }

    #cog {
        padding: 2vw !important;
    }
}

#tap-to-continue {
    position: absolute;
    top: 85vh;
    left: 30vw;
    width: 40vw;
    padding-top: 2vh;
    padding-bottom: 2vh;
    background-color: rgba(0, 0, 0, 0.9);
    text-align: center;
    opacity: 0;
}


.credits, .credits p {
    text-align: center !important;
}

.credits p {
    margin: 0;
}

.credits p.primary {
    margin-top: 3vh;
    font-style: italic;
}

.credits p.primary-only {
    margin-top: 6vh;
}

.credits p.secondary {
    margin-bottom: 1vh;
}

.credits p.spacer-top {
    margin-top: 6vh;
} 

.credits-content p:first-child {
    margin-top: 0;
}

#debug-info {
    text-align: center;
    font-size: 80%;
    width: 80vw;
}


.event {
    border-radius:4px;
    -webkit-border-radius:4px;
    color:#FFFFFF;
    font-size:12px;
    margin:0px 30px;
    padding:2px 0px;
}

.event.listening {
    background-color:#333333;
    display:block;
}

.event.received {
    background-color:#4B946A;
    display:none;
}

@keyframes fade {
    from { opacity: 1.0; }
    50% { opacity: 0.4; }
    to { opacity: 1.0; }
}
 
@-webkit-keyframes fade {
    from { opacity: 1.0; }
    50% { opacity: 0.4; }
    to { opacity: 1.0; }
}
 
.blink {
    animation:fade 3000ms infinite;
    -webkit-animation:fade 3000ms infinite;
}

/* ---------------------------------------------------- */
/* Desktop / Landscape Layout                           */
/* ---------------------------------------------------- */
@media screen and (min-width: 800px) and (orientation: landscape) {
    /* Main Content Containers */
    #game-main, #menu, #credits, #audio-tests, #chapter-selection, #map, .endscreen {
        width: 700px;
        left: 50%;
        margin-left: -350px;
        font-size: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    /* Paragraphs and Text Elements */
    #game p {
        font-size: 20px;
        line-height: 1.6;
    }

    #game-main div.chapter-marker {
        margin-top: 40px !important;
        margin-bottom: 80px !important;
    }

    #game-main div.mapbutton {
        margin-bottom: 20px;
        margin-left: 20px;
        padding: 10px;
    }

    /* Options / Choices List */
    #game ul.options li, .menu ul li {
        padding: 15px !important;
        margin-top: 15px;
        font-size: 22px;
    }

    /* Top-Left Menu Cog */
    #cog {
        top: 20px;
        left: 20px;
        padding: 10px !important;
    }
    #cog-graphic {
        width: 48px !important;
        height: 48px !important;
    }

    /* Splash Screen & Logos */
    #headphones-logo {
        width: 200px;
        height: 200px;
        margin-left: -100px;
        margin-top: -100px;
    }
    #headphones-text {
        height: auto;
        margin-top: 120px;
        font-size: 20px;
    }

    #causa-logo {
        width: 400px;
        height: 400px;
        margin-left: -200px;
        margin-top: -200px;
    }

    #splash-logo {
        width: 400px;
        height: 200px;
        margin-left: -200px;
        margin-top: -100px;
    }

    #tap-to-continue {
        left: 50%;
        margin-left: -200px;
        width: 400px;
        padding-top: 10px;
        padding-bottom: 10px;
        font-size: 18px;
    }

    /* Map Image */
    #mapimg {
        width: 600px;
        height: 600px;
        left: 50%;
        margin-left: -300px;
        margin-top: -300px;
    }
}
