:root {
  --bg: #272822;
  --header: #111;
  --txt: #ddd;
  --tab-bg: #111;
  --tool-bg: #333;
  --disabled: #222;
  --bg-gradient: linear-gradient(0, #333, #444);
}

html, body {
    margin: 0;
    text-align: center;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    /*padding-bottom: 1em;*/

}
html, body, input, textarea, button {
    font-family: 'Hind Siliguri', sans-serif;
    font-size: 15px;
    color: var(--txt);
}

body {
    line-height: 1.4;
}

a {
    color: var(--txt);
}

h2 {
    font-size: 1.5em;
    padding: 0;
    margin: .5em 1em;
}

h3 {
    font-size: 1.5em;
}

p {
    font-family: 'Spectral', serif;
}

li {
    font-family: 'Spectral', serif;
}

h2 a {
    text-decoration: none;
}

canvas, #header, #tool-wrapper {
    box-shadow: 0 0 1em rgba(0,0,0,.5);
}

.hidden {
    opacity: 0;
}

#header {
    width: 100%;
    background: var(--header);
    position: relative;
}

.depth {
    color: var(--txt);
    position: relative;
    font-weight: bold;
    text-shadow: 0px 0px 2px rgba(100, 100, 255, 1)
}

.header-right {
    font-family: "Palatino";
    position: absolute;
    top: 0;
    bottom: 0;
    margin: auto;
    right: .5em;
    color: var(--txt);
    text-decoration: none;
    height: 1em;
}

#question-link {
    padding-bottom: 2px;
    border: 2px solid var(--txt);
    border-radius: 1em;
    width: 1em;
    font-weight: bold;
    font-size: larger;
}

#how-link {
    display: none;
}

#lower-container {
    display: flex;
    margin: auto;
    flex-direction: column;
    max-width: 90vw;
}

#canvas-wrapper {
    flex-grow: 1;
    margin: 1em 0;
    position: relative;
    /*width: 90vw;
    height: 90vw;*/
}

#processing-canvas {
    max-height: 70vh;
    max-width: 90vw;
}

#txt-canvas {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    display: block;
    z-index: 1;
    opacity: 0;
    animation: pulse 5s 1;
}

#loading-img {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

@keyframes pulse {
    0% {
      opacity: .5;
    }
    50% {
      opacity: .5;
    }
    100% {
      opacity: 0;
    }
}

@keyframes fade {
    0% {
        opacity: .5;
    }
    100% {
        opacity: 0;
    }
}

#tool-wrapper {
    background-color: var(--tool-bg);
    margin-bottom: 1em;
}

#tabs {
    display: flex;
    background: var(--tab-bg);
    flex-direction: row;
    border: 0
}

#tabs button {
    flex-grow: 1;
    background: var(--header);
    color: var(--txt);
    border:0;
    cursor: pointer;
    padding: .5em 1em;
    margin: 0;
    outline: none;
}

#tabs span {
    margin: 1em 2em;
}

.selected-tab {
    background: var(--tool-bg)!important;
    /*border-top: 3px solid black!important;*/
    /*border-right: 3px solid black!important;*/
    border-bottom: 0 solid black!important;
}

.instructions {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 25em;
    max-width: 80vw;
}

.add-instruction {
    display: flex;
}

.retrieve-instruction {   
    display: none;
}

.instruction {
    margin: 1.5em .5em .5em .5em;
}

#add-file-upload, #retrieve-file-upload {
    display: none;
}

.custom-file-upload {
    display: inline-block;
    cursor: pointer;
}

#edit-watermark {
    padding: .5em;
    background: linear-gradient(0, #383838, #333 5%, #333 95%, #2e2e2e);
    resize: none;
    border: .05em solid #111;
    margin: .5em;
    border-radius: .5em;
}

.button {
    color: var(--txt);
    border: .05em solid #111;
    padding: .5em 1em;
    background: var(--bg-gradient);
    border-radius: .5em;
    margin: .5em;
}

#feedback-link {
    padding: 1em;
    background: var(--header);
    margin: 0 auto;
    text-decoration: none;
    width: 100%;
}


@media(min-width: 80em) {
    #header {
        margin-bottom: 2em;
    }

    #header h2 {
        text-align: left;
    }
    #question-link {
        display: none;
    }

    #how-link {
        display: block;
        font-family: 'Hind Siliguri', sans-serif;
    }

    #lower-container {
        flex-direction: row;
    }

    #canvas-wrapper {
        margin: 1em;
    }

    #tool-wrapper {
        margin: 1em 0;
    }

    #feedback-link {
        position: absolute;
        bottom: 0;
        right: 0;
        border-top-left-radius: 1em;
        width: unset;
    }
}
