/* Basic styles for page. All to be replaced with real ones. */
body {
    background: black;
    color: white;
    font-family: 'Open sans', sans-serif;
}

div#allcontainer {
    background: black;
    color: white;
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    overflow: hidden;
}

body.txt-colour-light div#allcontainer { background: black; color: white; }
body.txt-colour-dark div#allcontainer { background: white; color: black; }
body.txt-colour-dark div#allcontainer .scene[data-scene-id="title"] { color: white; }

/* If we are landscape, make allcontainer be a box in the middle of the screen */
@media screen and (orientation:landscape) {
    div#allcontainer {
        position: absolute;
        top: 0px;
        bottom: 0px;
        width: 848px;
        left: 50%;
        margin-left: -384px;
        overflow: hidden;
    }
}

div#opening{
  /* Bckground Gradient */
    background: #92bac6; /* Old browsers */
    background: -moz-linear-gradient(left, #92bac6 0%, #4693b4 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, right top, color-stop(0%,#92bac6), color-stop(100%,#4693b4)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(left, #92bac6 0%,#4693b4 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(left, #92bac6 0%,#4693b4 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(left, #92bac6 0%,#4693b4 100%); /* IE10+ */
    background: linear-gradient(to right, #92bac6 0%,#4693b4 100%); /* W3C */
  
    height: 100%;
    padding-top: 30%;
    position: absolute;
    text-align: center;
    top: 0;
    width: 100%;
    z-index: 3;
}

div#opening > h4{
    font-size: 17px;
    font-weight: 600px;
    text-align: inherit;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom:0px;
}

div#opening > span#divide{
    border: 1px lightblue solid;
    display:inline-block;
    height:0px;
    width:150px;
}  

div#opening > p{
    font-size: 14px;
    font-weight: 300px;
    letter-spacing: 1px;
    margin-top: 10px;
    padding: 0px 30%;
}

div#opening > a {
    color: white;
    display: block;
    font-size: 30px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 15px;
    text-decoration: none;
}

div#borderlighting {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
}
div#lighting {
    background: black;
    opacity: 0.3;
}

div#container, div#lighting {
    position: absolute;
    top: 40px;
    bottom: 40px;
    left: 40px;
    right: 40px;
    overflow: hidden;
    color: white;
}

div#container {
    background: transparent;
    left: 0;
    right: 0;
    padding-left: 40px;
    padding-right: 40px;
}

body.txt-colour-dark div#lighting, body.txt-colour-dark div#container { color: black; }
body.txt-colour-light div#lighting, body.txt-colour-light div#container { color: white; }

/* When on title screen... */
.title div#container {
    padding-left: 0;
    padding-right: 0;
    top: 0;
    bottom: 0;
}
.title #scenenavigator, .title #bottomtoolbar {
    display: none;
}

/* Scenes, current and not */
div.scene {
    z-index: 1;
    opacity: 0.2;
    x-webkit-transition: opacity 0.5s ease;
    display: none;
}
div.scene.current {
    z-index: 2;
    opacity: 1.0;
    display: block;
    padding: 0 0 100%;
}
div.scene.faded {
    opacity: 0;
}

p { margin: 0; padding: 0; }

button.prevscene, button.nextscene {
    border-width: 0;
    height: 46px;
    margin: 0 10px;
    text-indent: -9000em;
    width: 46px;
}
button.prevscene { background: url(img/prevarrow.png) center center no-repeat; }
button.nextscene { background: url(img/nextarrow.png) center center no-repeat; }

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
    only screen and (-o-min-device-pixel-ratio: 3/2),
    only screen and (min--moz-device-pixel-ratio: 1.5),
    only screen and (min-device-pixel-ratio: 1.5) {
        button.prevscene { background-image: url(img/prevarrow@2x.png); background-size: 46px 46px; }
        button.nextscene { background-image: url(img/nextarrow@2x.png); background-size: 46px 46px; }
}

/* The lights. */

body.txt-colour-dark #borderlighting, body.txt-colour-dark #lighting { display: none; } /* no lights with black text */

#borderlighting .light {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    /* x-webkit-transition: opacity 0.5s linear; Fading the lights crashes the iPad. So we do it in JS. */
}
#borderlighting .light.on {
    /* xopacity: 1;  Fading the lights crashes the iPad. So we do it in JS. */
}

/* character bios */
div.bio {
    position: absolute;
    display: inline-block;
    margin-top: 14px;
    background: white;
    color: black;
    padding: 20px;
    display: none;
    z-index: 30;
}
div.bio h4, div.bio p {
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    border-width: 0;
}
div.bio h4 {
    text-transform: uppercase;
    font-weight: bold;
}

/* aside notes */
aside {
    position: absolute;
    right: 0;
    width: 50%;
    background: #f3f2ec;
    visibility: hidden;
    padding: 8px;
    font-size: 14px;
    color: #666;
    display: none;
    z-index: 5;
}
aside span {
    display: block;
    padding: 12px;
    border: 1px solid #e0e0db;
}
aside::before {
    content: "";
    float: right;
    width: 40px;
    height: 23px;
    background: url(img/interface/note_dot.png) center center no-repeat;
    margin-right: -48px; /* 40px width of border: 20px to avoid padding */
    margin-top: 12px; /* avoid padding */
    text-align: center;
    visibility: visible;
    color: white;
    cursor: pointer;
}
aside::after {
    content: "";
    position: absolute;
    display: block;
    width: 0px;
    height: 0px;
    border: 5px solid transparent;
    border-width: 10px 10px;
    border-left-color: #f3f2ec;
    right: -20px;
    top: 21px;
}
aside.showing {
    visibility: visible;
}
body.notes-enabled aside { display: block; }

/* bottom toolbar */
#bottomtoolbar {
    position: absolute;
    bottom: -80px;
    left: 0;
    width: 100%;
    text-align: center;
    -webkit-transition: bottom 0.3s ease;
}
#bottomtoolbar.showing {
    bottom: 0;
}
#bottomtoolbar #round {
    width: 106px;
    height: 48px;
    background: url(img/interface/settings_tab_closed.png) bottom center no-repeat;
    display: inline-block;
    text-indent: -9000em;
    margin-bottom: -1px;
}
#bottomtoolbar.showing #round {
    background-image: url(img/interface/settings_tab_open.png);
}
#bottomtoolbar ul {
    border: 1px solid #fff;
    height: 80px;
    margin: 0;
    padding: 0;
    z-index: 2;
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.26, #f3f2ec), color-stop(0.49, #eaeae4), color-stop(1, #dededa));
}
#bottomtoolbar ul li {
    display: inline-block;
    list-style: none;
    width: auto;
    height: 60px;
    margin: 10px 0;
    padding: 0 13px;
    color: #61615e;
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0.26, #f3f2ec), color-stop(0.49, #eaeae4), color-stop(1, #dededa));
    border-right: 1px solid #e0e0db;
}
#bottomtoolbar ul li:first-child {
    border-left: 1px solid #e0e0e0;
}
#bottomtoolbar ul li span {
    text-transform: uppercase;
    display: block;
    font-weight: bold;
    margin-top: 4px;
}
#bottomtoolbar ul li button {
    display: inline-block;
    height: 42px;
    margin: 4px;
    border-width: 0;
    background: top center no-repeat transparent;
    cursor: pointer;
    text-indent: -9000em;
    width: 38px;
}
#bottomtoolbar ul li button.sound {
    background-image: url(img/interface/interface_volume_off.png);
}
body.sound-enabled #bottomtoolbar ul li button.sound {
    background-image: url(img/interface/interface_volume_on.png);
}
#bottomtoolbar ul li button.txt-small { background-image: url(img/interface/interface_text_small.png); }
body.txt-size-small #bottomtoolbar ul li button.txt-small {
    background-image: url(img/interface/interface_text_small.png), url(img/interface/interface_minipointer.png);
    background-position: top center, bottom center;
}
#bottomtoolbar ul li button.txt-medium { background-image: url(img/interface/interface_text_med.png); }
body.txt-size-medium #bottomtoolbar ul li button.txt-medium {
    background-image: url(img/interface/interface_text_med.png), url(img/interface/interface_minipointer.png);
    background-position: top center, bottom center;
}
#bottomtoolbar ul li button.txt-large { background-image: url(img/interface/interface_text_big.png); }
body.txt-size-large #bottomtoolbar ul li button.txt-large {
    background-image: url(img/interface/interface_text_big.png), url(img/interface/interface_minipointer.png);
    background-position: top center, bottom center;
}
#bottomtoolbar ul li button.txt-light { background-image: url(img/interface/interface_lighttext.png); }
body.txt-colour-light #bottomtoolbar ul li button.txt-light {
    background-image: url(img/interface/interface_lighttext.png), url(img/interface/interface_minipointer.png);
    background-position: top center, bottom center;
}
#bottomtoolbar ul li button.txt-dark { background-image: url(img/interface/interface_darktext.png); }
body.txt-colour-dark #bottomtoolbar ul li button.txt-dark {
    background-image: url(img/interface/interface_darktext.png), url(img/interface/interface_minipointer.png);
    background-position: top center, bottom center;
}
#bottomtoolbar ul li button.notes {
    background-image: url(img/interface/interface_notes_off.png);
}
body.notes-enabled #bottomtoolbar ul li button.notes {
    background-image: url(img/interface/interface_notes_on.png);
}

/* Scene navigator */
#scenenavigator {
    position: absolute;
    top: 0;
    left: -165px;
    width: 187px;
    height: 100%;
    -webkit-transition: left 0.3s ease;
}
#scenenavigator.showing {
    left: 0px;
}
#scenenavigator > a {
    position: absolute;
    right: 0;
    top: 10%;
    display: block;
    width: 22px;
    height: 48px;
    background: url(img/interface/progress_pointer.png) top left no-repeat;
    text-align: center;
    font-size: 30px;
    text-decoration: none;
    z-index: 1;
    text-indent: -1000em;
    -webkit-transition-property: top, bottom;
    -webkit-transition-duration: 0.5s;
}

#scenenavigator > p {
    width: 165px;
    height: 100%;
    background: #f3f2ec;
    text-align: right;
    position: relative;
}
#scenenavigator > p button {
    background: transparent url(img/interface/index_hide_btn.png) center center no-repeat;
    width: 19px;
    height: 16px;
    border-width: 0;
    text-indent: -9000em;
    position: absolute;
    top: 12px;
    right: 5px;
}

#scenenavigator ul {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    margin: 36px 0 0 0; /* top margin is height of #scenenavigator > p */
    padding: 0 0 0 0;
    background: #f3f2ec;
    width: 165px;
    z-index: 2;
}
#scenenavigator li {
    list-style: none;
    background: #deded9;
    text-transform: uppercase;
    color: #61615e;
    font-size: 0.7em;
    padding: 10px;
    margin: 0;
    border: 5px solid #f3f2ec;
    border-bottom: none;
    font-weight: bold;
    min-height: 20px;
    position: relative;
}
#scenenavigator li a {
    position: absolute;
    display: block;
    top: 0; left: 0; right: 0; bottom: 0;
    text-decoration: none;
    color: #61615e;
    padding: 0.5em;
    font-size: 14px;
}

#loading {
    position: absolute;
    width: 100%;
    height: 100%;
    background: black;
}
body.txt-colour-dark #loading { background: white; color: black; }
body.txt-colour-light #loading { background: black; color: white; }

p.prev-next-scene-wrapper {
    margin-top: 2em;
    text-align: center;
}

/* actual styles of the actual text */

.scene-para {
    margin: 1em 1em 3em;
    line-height: 2.0;
}
.scene-para.projected-para {
    margin-bottom: 0em;
    margin-top: 0em;
    margin-left: 2em;
}
.scene-para.projected-para p {
    padding-bottom: 1em;
}

.scene-para.scene-stagedirection {
    line-height: 1.0;
}

.scene-para p {
    display: inline;
    font-weight: 100;
    padding-left: 4px;
    border-left: 1px solid #666;
    margin-right: 10px;
    position: relative;
    line-height: 2;
}
.scene-para p:last-child {
    border-right-width: 0;
}

span.spokenby {
    font-style: small-caps;
    font-size: 0.6em;
    margin-top: 0em;
    line-height: 0.6;
    position: absolute;
    white-space: nowrap;
    margin-left: -5px;
    border-left: 1px solid #666;
    padding-left: 4px;
    height: 9px;
    margin-top: -2px;
    padding-top: 2px;
    visibility: hidden;
}
body.character-names-showing span.spokenby {
    visibility: visible;
}
span.line-stagedirection {
    font-size: 0.6em;
}
span.para-stagedirection {
    text-transform: uppercase;
    font-size: 0.6em;
    font-style: italic;
}

span.interrupted {
    border-left: 1px solid #999;
    position: relative;
    padding-left: 3px;
    opacity: 0.5;
}

/* Formatting of scenes */

body.txt-size-small .scene {
    font-size: 16px;
}
body.txt-size-medium .scene {
    font-size: 24px;
}
body.txt-size-large .scene {
    font-size: 40px;
}
body.txt-size-large .spokenby {
    height: 12px;
}

@media only screen and (max-device-width: 480px) {
    body.txt-size-small .scene {
        font-size: 12px;
    }
    body.txt-size-medium .scene {
        font-size: 16px;
    }
    body.txt-size-large .scene {
        font-size: 24px;
    }
}

/* @2x screen declarations */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
    only screen and (-o-min-device-pixel-ratio: 3/2),
    only screen and (min--moz-device-pixel-ratio: 1.5),
    only screen and (min-device-pixel-ratio: 1.5) {
        aside::before {
            background-image:url(img/interface/note_dot@2x.png);
            background-size: 23px 23px;
        }
        #bottomtoolbar #round {
            background: url(img/interface/settings_tab_closed@2x.png) bottom center no-repeat;
            background-size: 106px 48px;
        }
        #bottomtoolbar.showing #round {
            background-image: url(img/interface/settings_tab_open@2x.png);
            background-size: 106px 48px;
        }
        #bottomtoolbar ul li button.sound {
            background-image: url(img/interface/interface_volume_off@2x.png);
            background-size: 38px 34px;
        }
        body.sound-enabled #bottomtoolbar ul li button.sound {
            background-image: url(img/interface/interface_volume_on@2x.png);
            background-size: 38px 34px;
        }
        #bottomtoolbar ul li button.txt-small {
            background-image: url(img/interface/interface_text_small@2x.png);
            background-size: 38px 34px;
        }
        body.txt-size-small #bottomtoolbar ul li button.txt-small {
            background-image: url(img/interface/interface_text_small@2x.png), url(img/interface/interface_minipointer@2x.png);
            background-position: top center, bottom center;
            background-size: 38px 34px, 14px 7px;
        }
        #bottomtoolbar ul li button.txt-medium {
            background-image: url(img/interface/interface_text_med@2x.png);
            background-size: 38px 34px;
        }
        body.txt-size-medium #bottomtoolbar ul li button.txt-medium {
            background-image: url(img/interface/interface_text_med@2x.png), url(img/interface/interface_minipointer@2x.png);
            background-position: top center, bottom center;
            background-size: 38px 34px, 14px 7px;
        }
        #bottomtoolbar ul li button.txt-large {
            background-image: url(img/interface/interface_text_big@2x.png);
            background-size: 38px 34px;
        }
        body.txt-size-large #bottomtoolbar ul li button.txt-large {
            background-image: url(img/interface/interface_text_big@2x.png), url(img/interface/interface_minipointer@2x.png);
            background-position: top center, bottom center;
            background-size: 38px 34px, 14px 7px;
        }
        #bottomtoolbar ul li button.txt-light {
            background-image: url(img/interface/interface_lighttext@2x.png);
            background-size: 38px 34px;
        }
        body.txt-colour-light #bottomtoolbar ul li button.txt-light {
            background-image: url(img/interface/interface_lighttext@2x.png), url(img/interface/interface_minipointer@2x.png);
            background-position: top center, bottom center;
            background-size: 38px 34px, 14px 7px;
        }
        #bottomtoolbar ul li button.txt-dark {
            background-image: url(img/interface/interface_darktext.png);
            background-size: 38px 34px;
        }
        body.txt-colour-dark #bottomtoolbar ul li button.txt-dark {
            background-image: url(img/interface/interface_darktext@2x.png), url(img/interface/interface_minipointer@2x.png);
            background-position: top center, bottom center;
            background-size: 38px 34px, 14px 7px;
        }
        #bottomtoolbar ul li button.notes {
            background-image: url(img/interface/interface_notes_off@2x.png);
            background-size: 38px 34px;
        }
        body.notes-enabled #bottomtoolbar ul li button.notes {
            background-image: url(img/interface/interface_notes_on@2x.png);
            background-size: 38px 34px;
        }
        #scenenavigator > a {
            background: url(img/interface/progress_pointer@2x.png) top left no-repeat;
            background-size: 22px 48px;
        }
        #scenenavigator > p button {
            background: transparent url(img/interface/index_hide_btn@2x.png) center center no-repeat;
            background-size: 19px 16px;
        }
}
