﻿/***********/
/* Overall */
/***********/

body {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
    background-color: silver;
    min-width: 800px;
    min-height: 600px;
    font-size: 16px;
    font-family: cursive;
}

.centerscreen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    -webkit-box-shadow: 0px 0px 0px 2px rgba(0,0,0,1);
    -moz-box-shadow: 0px 0px 0px 2px rgba(0,0,0,1);
    box-shadow: 0px 0px 0px 2px rgba(0,0,0,1);
    background-size: cover;
    overflow: hidden;
}

.book_zoom {
    transition: transform .5s ease-out;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    background-size: cover;
}

.hidden {
    display: none;
}

.noselect {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.noclick {
    pointer-events: none;
}

.center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.blur {
    -webkit-filter: blur(5px);
    -moz-filter: blur(5px);
    -ms-filter: blur(5px);
    filter: blur(5px);
    -webkit-transition: 0.5s;
    -moz-transition: 0.5s;
    transition: 0.5s;
}

img.boximage {
    width: 100%;
    height: 100%;
}

#window {    
    position: absolute;
    left: 0px;
    right: 0px;
    top: 0px;
    bottom: 0px;
}

/**********/
/* Editor */
/**********/

#editor {
    display: none;
}

body.editor #editor {
    display: inherit;
    position: absolute;    
    left: 0px;
    width: 400px;
    top: 0px;
    bottom: 0px;
    background-color: orangered;
    box-sizing: border-box;
    border-right: 2px solid black;
}

body.editor #window {
    left: 400px;
    background-color: mediumvioletred;
}

/*************/
/* Main Menu */
/*************/

#main {
    width: 800px; 
    height: 600px;
    background-color: white;
}

#main .picture {
    float: right;
    width: 50%;
    background-color: red;
    height: 100%;
    position: relative;
    box-sizing: border-box;
    padding: 10px;
}

#main .picture .preview {
    border: 2px solid black;
    height: 380px;
    width: 380px;
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
    /*background-size: contain;*/
    /*background-repeat: no-repeat;*/
}

#main .picture .info {
    border: 2px solid black;
    height: 190px;
    width: 380px;
    box-sizing: border-box;
    margin-top: 10px;
}


#main .list {
    width: 50%;
    background-color: green;
    height: 50%;
    position: relative;
    overflow-y: scroll;
    overflow-x: hidden;
    box-sizing: border-box;
    padding: 10px;
}

#main .list table {
    width: 100%;
    border-collapse: collapse;
}

#main .list th {
    border: 2px solid black;
    padding: 3px;
}

#main .list td {
    border: 2px solid black;
    cursor: pointer;
    padding: 3px;
}

#main .settings {
    width: 50%;
    background-color: yellow;
    height: 50%;
    position: relative;
    box-sizing: border-box;
    padding: 10px;
}

#main .settings img {
    max-height: 100%;
    max-width: 100%;
}

/* Settings */

#settings .picture {
    float: right;
    width: 50%;
    background-color: red;
    height: 100%;
    position: relative;
}

#settings .picture img {
    max-height: 100%;
    max-width: 100%;
}

#settings .list {
    width: 50%;
    background-color: green;
    position: relative;
    overflow-y: scroll;
    overflow-x: hidden;
}

/* Book Menu */

#book_back_to_index {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 2px solid black;
    overflow: hidden;
    background-color: silver;
    opacity: 0;
    cursor: pointer;
    margin: 10px;
    transition: opacity 0.5s;
    display: flex;
    justify-content: center;
    align-items: center;
}

#book_back_to_index:hover {
    opacity: 1;
}

div.book_navigation_bar {
    position: absolute;
    overflow: hidden;
    left: 0px;
    right: 0px;
    bottom: 0px;
    pointer-events: none;
}

#book_navigation {
    border: 2px solid black;
    background-color: rgba(192, 192, 192, 0.5);
    opacity: 0;
    cursor: pointer;
    margin: 0px auto -2px auto;
    transition: opacity 0.5s;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    padding: 0px 5px;
    pointer-events: all;
}

#book_navigation:hover {
    opacity: 1;
}

#book_navigation div.button {
    width: 50px;
    height: 50px;
    margin: 10px 5px;
    border: 2px solid black;
    background-color: rgba(255,255,255,0.4);
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

#book img {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
}

#book canvas {
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    user-drag: none;
    -webkit-touch-callout: none;
    cursor: default;
}

/*************************/
/* default book elements */
/*************************/

/* buttons */
.book_zoom div.speak {
    background-color: rgba(255,255,255,0.5);
    border: 2px solid black;
    border-radius: 15px;
    padding: 0.3em;
    cursor: default;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/*
.book_zoom div.speak:before {
    border: solid 12px transparent;
    border-left: solid 12px black;
    border-top: solid 12px black;
    bottom: -24px;
    content: "";
    height: 0;
    left: 24px;
    position: absolute;
    transform: skew(-15deg);
    width: 0;
}
  
.book_zoom div.speak:after {
    border: solid 10px transparent;
    border-left: solid 10px rgba(255,255,255,0.5);
    border-top: solid 10px rgba(255,255,255,0.5);
    bottom: -19px;
    content: "";
    height: 0;
    left: 27px;
    position: absolute;
    transform: skew(-15deg);
    width: 0;
}
*/

.book_zoom div.think {
    background-color: rgba(255,255,255,0.4);
    border: 2px dotted black;
    border-radius: 15px;
    padding: 0.3em;
    cursor: default;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;}

.book_zoom div.story {
    background-color: rgba(255,175,0,0.5);
    border: 2px solid black;
    border-radius: 0;
    padding: 0.3em;
    cursor: default;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;}

.book_zoom div.sound {
    background-color: rgba(255,255,255,0.5);
    border: 2px solid white;
    border-radius: 15px;
    padding: 0.3em;
    cursor: default;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;}

.book_zoom div.button {
    border: 2px solid black;
    background-color: rgba(255,255,255,0.4);
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book_zoom div.button:hover {
    background-color: rgba(255,255,255,0.8);
}



/**************/
/* my classes */
/**************/
.book_zoom div.button_menu {
    border: 2px solid black;
    background-color: rgba(255,255,255,0.4);
    cursor: pointer;
    text-align: center;
    box-sizing: border-box;
    transition: background-color linear 0.3s;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.book_zoom div.button_menu:hover {
    background-color: rgba(255,255,255,0.8);
}

#main,
#settings {
	display: none;
}