/* general styling */

html, body {
    font-family: 'Lato', sans-serif;
    font-size: 1em;
    color: #444;
}

a {
    color: #369;
}

a:hover {
    text-decoration: none;
}

h1 {
    margin-bottom: 10px;
    font-size: 2.5em;
}

p {
    margin-top: 0;
    font-size: 1.1em;
}

tt {
    background: #ddd;
    padding: 2px 7px;
    border-radius: 3px;
}

.textfield {
    padding: 7px;
    border-radius: 3px;
    background: #dbf2ff;
    border: 1px solid #03124c;
    color: #034c49;
}

.textfield:focus {
    background: #e8f4ff;
}

.button {
    display: inline-block;
    height: 34px;
    padding: 7px;
    background: #006099;
    cursor: pointer;
    border-radius: 3px;
    color: white;
    border: 1px solid #03124c;
}

.button:hover {
    background: #007cc9;
}

.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}

/* Lato font (OFL), https://fonts.google.com/specimen/Lato#about,
   embedded with the help of https://google-webfonts-helper.herokuapp.com/fonts/lato?subsets=latin */

@font-face {
    font-family: 'Lato';
    font-style: normal;
    font-weight: 400;
    src: local(''),
    url('../font/lato-v17-latin-ext_latin-regular.woff2') format('woff2'), /* Chrome 26+, Opera 23+, Firefox 39+ */
    url('../font/lato-v17-latin-ext_latin-regular.woff') format('woff'); /* Chrome 6+, Firefox 3.6+, IE 9+, Safari 5.1+ */
}

/* centering, see https://bit.ly/2WBwODp, https://jsfiddle.net/kmturley/B3nxK/ & https://jsfiddle.net/v74fh3wy/ */

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

.container {
    height: 100%;
    overflow: auto;
}

.section {
    position: relative;
    width: 100%;
}

.fit {
    height: 100%;
}

.t {
    display: table;
    width: 100%;
    height: 100%;
}

.tc {
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

/* login area */

#login-box {
    padding: 20px;
}

#password-status {
    color: #a00;
    font-style: italic;
}

/* info area */

#info-area {
    background: rgba(0, 96, 153, 0.5); /* #006099 */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    transition: .5s ease-in-out;
}

#info-area.error {
    background: rgba(255, 0, 0, 0.5);
}

#info-area.fade-out {
    opacity: 0;
}

#info-box {
    position: relative;
    margin: auto;
    padding: 25px 45px;
    width: 800px;
    height: 440px;
    background: white;
    font-size: 1.4em;
    color: #444;
    text-align: left;
    border-radius: 5px;
}

#info-box h1 {
    font-size: 1.8em;
    margin: 30px 0 20px 0;
}

#info-box p {
    font-size: 1em;
    margin: 20px 0 10px 0;
}

#info-box .code-area {
    display: inline-flex;
    width: 100%;
}

#info-close-button {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    height: 20px;
    width: 20px;
    padding: 20px;
}

@media (max-width: 900px) {
    #info-box {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        right: 0;
        margin: 0;
        width: auto;
        height: auto;
        border-radius: 0;
        font-size: 1.2em;
        padding: 15px 30px;
        overflow-x: hidden;
        overflow-y: auto;
    }
    #info-close-button {
        right: 0;
        top: 0;
    }
}

#info-area .tab {
    display: block;
    float: left;
    text-align: left;
    text-decoration: none;
    color: #4d4d4d;
    background: #eee;
    font-size: 0.7em;
    padding: 3px 10px;
    font-weight: bold;
    border-top-left-radius: 3px;
    border-top-right-radius: 3px;
}

#info-area .tab:hover {
    background: #bbb;
}

#info-area .tab.tab-active {
    background: #ccc;
}

#info-area .tab.tab-left {
    border-top-left-radius: 3px;
}

#info-area .tab.right {
    border-top-right-radius: 3px;
}

#info-area .code-area input.code-box {
    flex-grow: 6;
    font-family: monospace;
    margin: 0;
    background: #ccc;
    padding: 15px 10px;
    border: none;
    border-radius: 3px 0 0 3px;
    width: 100%;
}

#info-area .code-area input.code-box-with-tabs {
    border-top-left-radius: 0;
}

#info-area .code-area button {
    flex-grow: 1;
    display: inline-block;
    padding: 0 15px;
    background: #006099;
    cursor: pointer;
    color: white;
    border: 1px solid #03124c;
    border-radius: 0 3px 3px 0;
    white-space: nowrap;
    font-size: .8em;
}

#info-area .code-area button:hover {
    background: #007cc9;
    border: 1px solid #007cc9;
}

#info-area .code-area button svg {
    vertical-align: bottom;
}

/* info: what is this */

#info-area .info-what-is-this h2 {
    font-size: 1.2em;
    margin: 13px 0 0 0;
}

#info-area .info-what-is-this p {
    margin: 15px 0 10px 0;
    font-size: .9em;
}

/* copied tooltip, see https://www.w3schools.com/howto/howto_js_copy_clipboard.asp */

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 160px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 150%;
    left: 50%;
    margin-left: -85px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip .tooltiptext.copied {
    width: 100px;
    margin-left: -55px;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* drag & drop area, see https://stackoverflow.com/a/33917000/1440785 (CC BY-SA 3.0) */

#drop-area {
    background: #006099;
    color: white;
    font-size: 2em;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    opacity: 0.6;
    visibility: hidden;
}

/* main area */

#main-area {
    display: flex;
    flex-flow: column;
    height: 100%;
}

#header-area {
    display: flex;
    flex-flow: column;
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    color: white;
    background-color: #004c79;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
    z-index: 2;
}

#header-area * {
    margin: 0;
}

#header-flex-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    padding-bottom: 1px;
}

#header-area .col-auto {
    position: relative;
    flex: 0 0 auto;
    width: auto;
    max-width: 100%;
    padding-left: 4px;
    padding-right: 4px;
}

#header-area .col-first {
    padding-left: 10px;
}

#header-area .col-last {
    padding-left: 0;
}

#header-area .col {
    position: relative;
    flex-basis: 0;
    flex-grow: 1;
    max-width: 100%;
    width: 100%;
}

#header-area img {
    margin: 0 5px;
}

#header-area h1 {
    line-height: 40px;
    margin-top: -5px;
    font-size: 1.4em;
    color: white;
    padding-right: 20px;
}

#header-area h1:hover {
    color: #dde7ff;
}

#header-area label {
    color: white;
    line-height: 40px;
    padding-left: 2px;
    padding-right: 2px;
    vertical-align: middle; /* align with select/input */
}

#header-area button {
    height: 34px;
    padding: 0 10px;
    margin: 3px 1px;
}

#header-area button:disabled {
    background: #54656f;
    cursor: not-allowed;
}

#header-area input[type="checkbox"] {
    height: 40px;
    vertical-align: bottom;
}

#header-area input.error {
    background: #ffd6d6;
}

#header-area select {
    appearance: none;
    padding: 7px 5px;
    height: 34px;
    text-align: center;
    vertical-align: middle;
}

#header-area select:hover {
    background: #0074ba;
}

#header-area select:disabled {
    background: #54656f;
    cursor: not-allowed;
}

#header-area .divider {
    display: inline;
    width: 10px;
    height: 40px;
    border-right: 1px solid #aaa;
    margin-right: 10px;
}

#header-area #file-id {
    width: 130px;
}

@media (max-width: 900px) {
    #header-area h1 {
        margin: 0 300px; /* we want this on a line alone */
    }
    #header-area .col {
        display: none;
    }
}

@media (max-width: 700px) {
    #header-area h1 {
        margin: 0 200px; /* we want this on a line alone */
    }
}

@media (max-width: 500px) {
    #header-area h1 {
        margin: 0 100px; /* we want this on a line alone */
    }
    #header-area .divider {
        display: none;
    }
}

@media (max-width: 400px) {
    #header-area h1 {
        margin: 0 50px; /* we want this on a line alone */
    }
}

#upload-status {
    margin-right: 5px;
}

#text-area {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

#text {
    flex: 1;
    border: none;
    margin: 0;
    padding: 10px;
    font-size: 1.3em;
    overflow: auto;
}
