/* Defaults courtesy of HTML5 Boilerplate */
@media all {

    /*
     * What follows is the result of much research on cross-browser styling.
     * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
     * Kroc Camen, and the H5BP dev community and team.
     */
    /* ==========================================================================
       Base styles: opinionated defaults
       ========================================================================== */
    html {
        color: #222;
        font-size: 1em;
        line-height: 1.4;
    }

    /*
     * Remove text-shadow in selection highlight:
     * https://twitter.com/miketaylr/status/12228805301
     *
     * These selection rule sets have to be separate.
     * Customize the background color to match your design.
     */
    ::selection {
        background: #b3d4fc;
        text-shadow: none;
    }

    /*
     * A better looking default horizontal rule
     */
    hr {
        display: block;
        height: 1px;
        border: 0;
        border-top: 1px solid #ccc;
        margin: 1em 0;
        padding: 0;
    }

    /*
     * Remove the gap between audio, canvas, iframes,
     * images, videos and the bottom of their containers:
     * https://github.com/h5bp/html5-boilerplate/issues/440
     */
    audio,
    canvas,
    iframe,
    img,
    svg,
    video {
        vertical-align: middle;
    }

    /*
     * Remove default fieldset styles.
     */
    fieldset {
        border: 0;
        margin: 0;
        padding: 0;
    }

    /*
     * Allow only vertical resizing of textareas.
     */
    textarea {
        resize: vertical;
    }
} /* unnecessary but allows collapsing the area */
/* ==========================================================================
   Author's custom styles
   ========================================================================== */
   
div, img, body {
    width: 100%;
    height: 100%;
    position: absolute;
    margin: 0;
    padding: 0;
    border: none;
	display: block;
	box-sizing: border-box;
}
div { 
    background-color: transparent;
    background-size: contain;
    background-repeat: no-repeat;
}
body {
	left: 0;
	top: 0;
	overflow: hidden;
	width: 100vmax;
	height: 100vmin;
}

#container {
    width: 100vmax;
    height: 100vmin;
    position: fixed;
    box-sizing: border-box;
	transform-origin: center;
	left: 0;
	top: 0;
}
/*@media screen and (orientation: portrait) {
	#container {
		transform: rotate(-90deg);
		left: calc(50vmin - 50vmax);
		top: calc(50vmax - 50vmin); 
	}
	body {
		width: 100vmin;
		height: 100vmax;
	}
}*/

#splashScreen {
    background-color: black;
	z-index: 10;
}

.fill {
	height: 100%;
	width: 100%;
	position: absolute;
	top: 0;
	left: 0;
}

#logoImage {
}

#jackDiv {
    opacity: 0; /* Initially */
	left: 0;
	bottom: 0;
	top: auto;
    overflow: hidden;
	height: 50vmin;
	width: calc(0.737 * 50vmin);
	max-height: calc(100vmax - 100vmin); /* iPad version */
	max-width: calc(73.7vmax - 73.7vmin);
	min-height: 12vmax;
	min-width: 9vmax;
}

#onoSendaiJack {
	position: relative; /* So that it sets the size of its container */
	margin: 0;
	padding: 0;
	z-index: 1;
}

#onoSendaiDoor { z-index: 2; }

#onoSendaiPort { z-index: 3; pointer-events: none; }

.overlay {
    position: fixed;
    pointer-events: none; /* Disabled the "off" button for now (possibly for good) */
    z-index: 3;
	left: auto;
	top: auto;
}
.edge { z-index: 2; }
.top { top: 0; }
.btm { bottom: 0; }
.left { left: 0; }
.right { right: 0; }

/* @media (min-aspect-ratio: 348/515) { /* Landscape orientation */
    .overlay { width: auto; }
    .top.left { height: 30vmin; }
    .top.edge { height: 10vmin; width: calc(100vmax - 42vmin); left: 33vmin; right: 9vmin; }
    .top.right { height: 15vmin; }
    .left.edge { height: 41vmin; width: 6.5vmin; top: 29.5vmin; bottom: 29.5vmin; }
    .left.btm { height: 30vmin; }
    .btm.edge { height: 20vmin; width: calc(100vmax - 47vmin); left: 24vmin; right: 24vmin; }
    .btm.right { height: 20vmin; }
/*}*/
/* @media not all and (min-aspect-ratio: 348/515) { / * Portrait * /
    .overlay { height: auto; }
    .top.left { width: 50vw; }
    .top.edge { width: 39.5vw; height:15vw; left: 49.5vw; right: 11vw; }
    .top.right { width: 20vw; }
    .left.edge { width: 10vw; height: calc(100vh - 88vw); top: 44.5vw; bottom: 44.5vw; }
    .left.btm { width: 37.5vw; }
    .btm.edge { width: 26vw; height: 30vw; left: 37vw; right: 37vw; }
    .btm.right { width: 37.5vw; }
} */

#workSpace {
    position: fixed;
    overflow: scroll;
	height: auto;
	width: auto;
    right: 0;
	left: 4vmin;
	top: 8vmin;
	bottom: 15vmin; 
}

#deskSpace {
    position: absolute;
    background-image: url(./media/lowResBackground.jpg);
    background-size: 150%;
	background-position: top center;
	background-repeat: repeat-y;
	width: 100%;
	height: 500vmin;
}

#siteSpace {
	width: 90%;
	height: 395vmin;
	top: 100vmin;
	left: 5%;
	border: 1px solid black;
}

/* Obsolete, possibly forever 
#parallax1Space {
    position: absolute;
    z-index: 2;
    border: 1pt solid grey;
}

#parallax2Space {
    position: absolute;
    z-index: 1;
} */

/* Used for a hack - makes a div mostly but not quite entirely transparent */
.translucentBackground {
    z-index: -1;
    opacity: 0.1;
    background-color: white;
}

#toolSpace { 
	width: 0vmin;
	height: 0vmin;
	top: 50vmin;
	overflow: visible;
	transform-origin: center;
	position: fixed;
	pointer-events: auto;
	z-index: 1;
}

#netSpace {
	width: 190vmax;
	left: 5vmax;
	height: 90vmin;
	top: 5vmin;
}

#chatSpace {
	width: 45vmax;
	right: 5vmax;
	left: auto;
	height: 395vmin;
	top: 100vmin;
}

#norseMap {
	position: absolute;
	height: 96%;
    top: 2%;	
    width: 96%;
	left: 2%;
    background-image: url(./media/NorseMapStill.jpg);
    background-size: cover;
	background-position: top center;    
}

#codeDisplayPre {
    width: 108%;
    margin: -4% -5px -4% 0;
}

#binaryDisplayDiv {
    width: 108%;
    margin: -4% -5px -4% 0;
    overflow: hidden;
}

.imageFill {
    display: inline-block;
    pointer-events: none;
}

.centerAnchor {
    transform: translateX(-50%) translateY(-50%);
}

.fingerprintDiv {
    border: 1px solid black;
    border-radius: 3%;
    padding: 4%;
    overflow: hidden;
}

.fLock {
    background: dimgrey;
    background: rgba(0, 0, 0, 0.55);
    background: linear-gradient(to bottom right, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.65));
}

.fKey {
    background: aliceblue;
    background: rgba(0, 0, 0, 0.1);
}

.fingerprintPanel {
    pointer-events: none;
}

.fingerprintLine {
    height: 8%;
    overflow: hidden;
}

.fingerprintLineImg {
    height: 100%;
    width: auto;
}

.toolButton, #toolKnob {
	width: 56vmin;
	height: 28vmin; /* Note - we're using this in a calculation inside the JS, one which might misbehave if this gets defined in %; careful if changing it to a percentage-based measurement. */
	background-image: url(./media/toolbutton.png);
	overflow: visible;
	pointer-events: none;
}
#toolKnob {
	background-image: url(./media/toolbutton_knob.png);
	background-size: 200%;
	background-position: 0% 26%;
}

.toolButton .handle {
	width: 40%;
	height: 37%;
	left: auto;
	top: 0%;
	right: 2%;
}
#toolKnob .handle {
	width: 30%;
	height: 60%;
	left: 0;
	top: -4%;
}
.handle {
	pointer-events: auto;
}

.toolButton p {
	position: absolute;
	display: block;
	top: 2vmin;
	right: 6vmin;
	width: auto;
	height: auto;
	text-align: right;
	font-family: Wallpoet;
	font-size: 4.15vmin;
	font-style: normal;
	font-variant: small-caps;
	font-weight: 400;
	background-color: transparent;
	color: white;
	margin: 0;
}



.scope {
    pointer-events: auto;
    z-index: 9; 
    background-color: transparent;	
	height: 16vmin;
	width: 32vmin;
	transform-origin: center;
	transform: translate3d(0px, 0px, 0px) scale(0.75) rotate(-45deg);
	left: 3vmin;
	top: 47.5vmin;
}
.active.scope {
}
.ready.scope, .passive.scope {	
}
.passive.scope {
	visibility: hidden;
	opacity: 0;
}

.reticle { 
	
}
.passive.scope .noGlow {
	opacity: 1;
}
.passive.scope .yesGlow {
	opacity: 0;
}
.active.scope .noGlow {
	opacity: 0.75;
}
.active.scope .yesGlow {
	opacity: 0.05;
}


#flipSpace {
	height: auto;
	width: auto;
    right: 0;
	left: 4vmin;
	top: 8vmin;
	bottom: 15vmin; 
}

.threeDcontainer {
	position: fixed;
    overflow: hidden;
	perspective: 200vmax;
}

#flipper {
	position: relative;
	height: 110vmin;
	width: calc(120vmax - 7.2vmin);
	margin: auto;
	left: -10vmax;
	top: -8vmin;
	/*transform-origin: 50% 50% -50vmax;*/
	transform: translateZ(-50vmax);
}

.threeDmanipulable {
	transform-style: preserve-3d;
	pointer-events: none;
}
.threeDmanipulable img, .threeDmanipulable div {
	backface-visibility: hidden;
}

.face, #farDepth {
	height: 100%;
	width: 100%;
	position: absolute;
	left: 0;
	top: 0;
	backface-visibility: hidden;
}

.front {
	z-index: 2;
	transform: translate3d(0, 0, 3vmin) rotateY(0deg);
	overflow: scroll;
}
.back {
	transform: translate3d(0, 0, 3vmin) rotateY(180deg);
}

#farDepth {
	height: 140vmin;
	top: -20vmin;
	width: 160vmax;
	left: -30vmax;
	/*background-image: url(./media/NorseMapStill.jpg);
    background-size: cover;*/
	transform: translate3d(0, 0, -120vmax);
	overflow: visible;
}

#proxy {
	display: none;
}

#proxyTrigger {
	background: rgba(0,0,0,0.1);
	pointer-events: auto;
	transform: translateZ(-1px);
}
	
#splashScreen .threeDcontainer {
	height: 100vmin;
	width: 75vmin;
	margin-top: 0;
	margin-left: calc(50vmax - 37.5vmin);
	position: relative;
	overflow: visible;
}
#imageSpinner {
	position: relative;
	height: calc(150 / 800 * 100vmin);
	width: calc(150 / 600 * 75vmin);
	top: calc(28 / 800 * 100vmin);
	margin-left: calc(384 / 600 * 75vmin);
	transform: rotateY(0deg) translateZ(-2vmax);
	border-radius: calc(60 / 600 * 75vmin);
	overflow: hidden;
}
#waitMessage {
	position: absolute;
	top: 15vmin;
	left: 65%;
	height: 15vmin;
	width: 30vmax;
	font-family: Wallpoet;
	font-size: 16px;
	font-style: normal;
	font-variant: small-caps;
	font-weight: 400;
	line-height: 28.6px;
	background-color: transparent;
	color: white;
	opacity: 0;
	visibility: hidden;
}


	






/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden {
    display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * http://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}
