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

html, body, button, input, select {
    font-family: 'Segoe UI', sans-serif;
}

body {
    padding: 0 1em;
    overflow-y: scroll;
}

a[name=top] {
    position: absolute;
    top: -1em;
}

header, section, footer {
    clear: both;
    position: relative;
}

header {
    margin-bottom: 1em;
    padding-top: 1em;
}

header h1 {
    font-size: 24px;
    font-weight: normal;
    color: #aaa;
    line-height: 18px;
    text-transform: lowercase;
    letter-spacing: 2px;
    display: inline;
}

.logo a {
    border: none;
    text-decoration: none;
}

.logo img {
    vertical-align: text-bottom;
    margin-right: 0.5em;
}

.logo h2 {
    letter-spacing: 6px;
}

#blueprint-canvas {
    background-color: #3177C6;
    margin-bottom: 1em;
    overflow: hidden;
}

#view-params {
    min-height: 23em;
    overflow: hidden;
    position: relative;
}

#rendering-options-menu, #rendering-options-top {
    width: 14em;
    padding: .5em 1em 1em 1em;
    margin: 1em;
    background-color: #fff;
    border: 1px solid #ddd;
    color: #555;
    box-shadow: 6px 6px 6px rgba(0,0,0,0.15);
}

#rendering-options-top {
    position: absolute;
    right: 0;
    bottom: -30px;
    padding-bottom: 30px;
    margin-bottom: 0;
    border-bottom-color: #fff;
    text-align: right;
}

#rendering-options-top button {
    background-color: #fff;
    color: #555;
    border: none;
    outline: none;
    font-size: medium;
    padding-right: 0;
}

#rendering-options-top button .icon.dropdown, #insert-top button .icon.dropdown {
    display: none;
}

.collapse-rendering-options #rendering-options-top button .icon.dropdown, .collapse-insert-menu #insert-top button .icon.dropdown {
    display: inline;
}

.collapse-rendering-options #rendering-options-top button .icon.dropup, .collapse-insert-menu #insert-top button .icon.dropup {
    display: none;
}

.collapse-rendering-options #rendering-options-top {
    background-color: transparent;
    border-color: transparent;
    bottom: 0;
    padding-bottom: 0;
    box-shadow: none;
}

#rendering-options-menu {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
    position: relative;
    float: right;
}

#rendering-options-menu hr {
    margin: 1em 0;
    border: 1px solid #ddd;
    border-bottom-width: 0;
    border-left-width: 0;
    border-right-width: 0;
}

#rendering-options-menu #measurement {
    border-top: 1px solid #ddd;
    padding-top: .5em;
}

#params-link {
    display: none;
    font-weight: 300;
    margin-bottom: 1em;
}

body.show-params-link #params-link {
    display: block;
}

#rendering-options-menu .view-controls {
    letter-spacing: 1px;
    font-variant: small-caps;
    color: #777
}

#rendering-options-menu #measurement {
    padding-bottom: .5em;
    color: #333;
}

#rendering-options-menu .view-controls .zoom-unit {
    float: right;
}

#rendering-options-menu .view-controls div {
    clear: right;
}

.collapse-rendering-options #rendering-options-menu, .collapse-insert-menu #insert-menu {
    display: none;
}

.param-active #rendering-options-menu {
    background-color: rgba(255, 255, 255, 0.1);
}

.param-active #rendering-options-menu > div > div, .param-active #params-link {
    visibility: hidden;
}

.param-active #rendering-options-menu > div > div.active, .param-active #rendering-options-menu #measurement {
    visibility: visible;
    color: #0ff;
    text-shadow: 0 0 1em rgba(0,0,0,.5);
}

#params div {
    margin-bottom: .6em;
}

#params select, input[type=text] {
    width: 100%;
}

#params input[type=range] {
    height: 10px;
    margin: 0;
    padding: 0;
    position: relative;
    width: 8em;
}

#params input[type=number] {
    border: none;
    width: 5em;
    margin-left: 1em;
}

#params form {
    display: inline;
}

#params label {
    cursor: pointer;
    display: block;
    font-weight: 300;
}

#view {
    color: #fff;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

#view-svg-container {
    margin: 2em;
}

/*svg#drawing {
    transition: margin-left 0.35s cubic-bezier(0.2, 0, 0, 1), margin-top 0.35s cubic-bezier(0.2, 0, 0, 1);
}*/

svg#drawing line, svg#drawing circle, svg#drawing path {
    stroke: #fff;
    fill: none;
}

svg#drawing .locked {
    stroke: #0000FF;
}

#view svg {
    overflow: visible;
}

#view svg#drawing text {
    fill: turquoise;
    stroke: none;
}

.collapse-annotation #view svg#drawing text {
    display: none;
}

#view svg#drawing g#captions text {
    fill: yellow;
    display: unset;
    font-family: monospace;
}

.collapse-flow #view svg#drawing .flow {
    display: none;
}

#view svg#drawing .locked + text {
    fill: yellow;
}

#crosshairs line {
    stroke: #87cefa;
}

.collapse-origin #crosshairs line, .collapse-origin #grid {
    display: none;
}

#grid {
    height: 100%; 
    overflow: visible;
    position:absolute;
    width: 100%; 
}

.grid-line-1 {
    stroke: #5B9DE3;
    opacity: 0.6;
}

.grid-line-10 {
    stroke: #5B9DE3;
    opacity: 0.8;
}

svg#pointers, #touch-shield {
    display: none;
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    width: 100%;
}

svg#pointers circle {
    stroke: #00B2B2;
    stroke-width: 1px;
    fill: #0059B2;
    opacity: 0.5;
}

svg#pointers line {
    stroke: #00468C;
    stroke-width: 1px;
}

#touch-shield {
    background-color: transparent;
}

.pointing svg#pointers, .pointing #touch-shield{
    display: block;
}

#notes {
    border: 1px solid rgba(0,0,111,0.3);
    color: #fdfdff;
    padding: 0 1em;
    margin: 0 1em .7em 1em;
    background-color: rgba(37, 95, 168, .6);
    position: relative;
}

#notes h1, #notes h2, #notes h3, #notes h4, #notes h5, #notes h6, #notes th {
    font-weight: 600;
    color: #cef;
}

#notes th {
    white-space: nowrap
}

#notes td {
    word-break: break-all;
}

#notes td:first-child {
    color: midnightblue;
    vertical-align: top;
    white-space: nowrap;
}

#notes h1 {
    font-size: 1.3em;
}

#notes h2 {
    font-size: 1.2em;
}

#notes h3 {
    font-size: 1.1em;
}

#notes h4, #notes h5, #notes h6 {
    font-size: 1em;
}

#notes table {
    margin: 1em 0;
}

#notes a {
    color: #0ff;
}

#notes .section {
    margin-bottom: 1em;
}

#notes .separator {
    letter-spacing: 0.2ex;
    background-color: rgba(0,0,111,0.2);
    margin: 0 -1em .5em -1em;
    padding: .5em;
}

#notes .console {
    font-family: monospace;
}

.collapse-notes #notes, .no-notes #notes, .no-notes #notes-toggle {
    display: none;
}

.has-units .unitless {
    display: none;
}

#download h2 {
    font-weight: normal;
    font-size: smaller;
    color: #777;
    margin: 0;
    padding: 0;
}

#download a, #download button {
    background-color: #ddd;
    border: 0;
    color: #333;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
    margin-top: .5em;
    margin-right: 1em;
    padding-top: .2em;
    padding-bottom: .3em;
    width: 9em;
    text-align: center;
    text-transform: uppercase;
    font-size: smaller;
}

#download-progress {
    height: .25em;
    width: 0;
    background-color: green;
    margin-top: .5em;
    margin-bottom: .5em;
}

#download-ready a {
    width: auto;
    padding-left: 2em;
    padding-right: 2em;
}

#download-generating, #download-ready, #download-error, #download-options
{
    display: none;
}

#download-options .download-option {
    border: 1px inset;
    box-sizing: border-box;
    display: none;
    font-size: medium;
    padding: .5em;
    margin-bottom: .5em;
    width: 100%;
}

#download-options .download-option.selected {
    display: block;
}

#download-options .download-option h2 {
    font-variant: small-caps;
    margin-bottom: .5em;
}

#download-options .download-option label {
    display: block;
    font-size: smaller;
}

#download-options .download-option .option-block {
    display: inline-block;
    margin-left: 1em;
    min-width: 8em;
}

#download-options .download-option select {
    width: 100%;
}

#download-preview-container {
    padding-right: 1em;
    margin-top: .5em;
    margin-bottom: 0;
}

#download-preview {
    width: 100%;
    padding: .5em;
    border: 1px solid #eedd88;
    background-color: #ffee99;
    color: #333300;
    font-size: small;
}

.download-options #download-select,
.download-generating #download-select,
.download-generating #download-ready {
    display: none;
}

.download-generating #download-generating,
.download-ready #download-ready,
.download-options #download-options,
.download-error #download-error {
    display: block;    
}

.download-ready #download-select, 
.download-ready #download-generating, 
.download-error #download-select, 
.download-error #download-generating {
    display: none;
}

.onscreen-help {
    font-size: small;
    color: #777;
    padding-top: .2em;
}

#download .onscreen-help button {
    width: auto;
    margin-right: 0;
    margin-top: 0;
    text-transform: none;
    padding-top: 0;
    padding-bottom: 0;
}

.code-header, .code-footer {
    font-family: monospace;
    background-color: #d0d0d0;
    padding: .5em 1em;
    border: 1px solid #aaa;
    position: relative;
    line-height: 22px;
}

.code-header {
    margin-top: 2em;
    text-align: right;
}

.code-header > span:first-child {
    position: absolute;
    left: 1em;
}

.code-header label {
    font-size: inherit;
}

.code-header button {
    font-family: inherit;
    margin-left: 1em;
}

.code-header button.run {
    background-color: green;
    color: white;
}

.CodeMirror {
    height: auto;
}

.code-error {
    background-color: orange;
}

.scroll-nav-links {
    position: fixed; 
    bottom: .75em; 
    right: 0;
    z-index: 7;
    padding: .25em .5em .5em 1em; 
    background-color: #555;
    opacity: .85;
    border-top-left-radius: 1em;
    border-bottom-left-radius: 1em;
}

.scroll-nav-links span {
    font-size: smaller;
    margin-right: .5em;
    color: #ccc;
    text-transform: uppercase;
}

.scroll-nav-links a {
    color: #fff;
    font-weight: bold;
    text-decoration: none;
}

.about {
    font-size: smaller;
    margin-top: 1em;
    padding-top: 2em;
    color: #aaa;
}

.about a {
    color: #aaa;
}

.about h4 {
    margin-bottom: 0;
}

.about ul {
    margin-top: 0;
    overflow: hidden;
}

.about li {
    float: left;
    padding-right: 4ex;
}

.about blockquote {
    margin: 0;
    letter-spacing: 0.2pt;
}

footer {
    font-size: smaller;
    line-height: 2em;
    margin-bottom: 1em;
    margin-top: 2em;
    color: #aaa;
}

footer a {
    color: inherit;
    display: inline-block;
    margin-right: 1em;
}

footer a:hover {
    text-decoration: underline;
}

footer img {
    height: 20px;
    vertical-align: text-bottom;
    margin-bottom: -1px;
    margin-right: 7px;
}

.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body.side-by-side {
    padding: 0;
    overflow: hidden;
}

.side-by-side main {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 50%;
    padding: 0 1em;
    overflow-y: scroll;
}

.side-by-side #view-params {
    min-height: 28em;
}

.side-by-side section.editor {
    position: fixed;
    top: 0;
    left: 50%;
    right: 0;
    bottom: 0;
}

.side-by-side .code-header {
    margin-top: 0;
}

.side-by-side .about {
    border-top: 1px solid #ccc;
    margin-top: 3em;
}

.side-by-side .scroll-nav-links {
    display: none;
}

/* this is to clear the logo */
@media only screen and (max-width: 540px) {
    header {
        height: 90px;
    }
}

body.full-screen {
    padding: 0;
}

.full-screen header, .full-screen #rendering-options-menu, .full-screen section#download, .full-screen .about, .full-screen footer {
    display: none;
}

.full-screen section#blueprint-canvas {
    margin-bottom: 0;
}

.full-screen .code-header {
    margin-top: 0;
}

.full-screen #blueprint-canvas {
    background-color: inherit;
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
}

.full-screen svg#drawing line, .full-screen svg#drawing circle, .full-screen svg#drawing path {
    stroke: #000;
}

.wait svg#drawing line, .wait svg#drawing circle, .wait svg#drawing path {
    opacity: .5;
}

.full-screen #view-svg-container {
    margin: 0;
}

.full-screen #view svg#drawing text {
    fill: #777;
}

#view svg#drawing g#captions text {
    fill: #888;
}

.full-screen #view svg#drawing .locked + text {
    font-weight: bold;
}

.full-screen #notes {
    color: #555;
}

.full-screen #notes h1, .full-screen #notes h2, .full-screen #notes h3, .full-screen #notes h4, .full-screen #notes h5, .full-screen #notes h6, .full-screen #notes th, .full-screen #notes td:first-child {
    color: #333;
}

.full-screen .grid-line-1 {
    stroke: #ccc;
}

.full-screen .grid-line-10 {
    stroke: #ccc;
}

#insert-top {
    display: inline-block;
    position: relative;
}

#insert-menu {
    background-color: #333;
    border: 1px solid #444;
    box-shadow: 6px 6px 6px rgba(0,0,0,0.15);
    height: 40em;
    margin: 0 0 2em 0;
    min-height: 23em;
    padding: 0;
    position: absolute;
    right: -6em;
    width: 20em;
    z-index: 7; /* above CodeMirror scrollbars */
}

#insert-menu iframe {
    border: 0;
    height: 100%;
    width: 100%;
}

@media only screen and (max-width: 400px) {
    #insert-menu {
        width: 16em;
    }
    #code-editor-title {
        display: none;
    }
}
