:root {
    --TeemaVari: #e3a538;
    --TeemaVarjo: #c79132;
}
* {
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box; /* Firefox, other Gecko */
    box-sizing: border-box; /* Opera/IE 8+ */
    font-family: 'Exo', sans-serif;
}
body,
html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#body {
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#Kirjaudu {
    width: 90%;
    margin-left: 5%;
}
#Kirjaudu input {
    display: block;
    width: 100%;
    margin-bottom: 20px;
    height: 35px;
    margin-top: 5px;
    border: 1px solid #aaa;
    font-size: 1em;
    padding-left: 10px;
}
.Line{
    visibility: hidden;
}
.Koodi{
    visibility: hidden;
}
#Tulostuspalkki #Allekirjoita,
#Tulostuspalkki #Laheta{
    visibility: hidden;
}
#Kirjaudu input[type='submit'] {
    background: var(--TeemaVari);
    color: white;
    border: 0;
    height: 40px;
}
#Kirjaudu input[type='submit']:hover {
    background: var(--TeemaVarjo);
    cursor: pointer;
}
h2 {
    width: 100%;
    text-align: center;
    font-size: 2em;
    color: var(--TeemaVari);
    font-family: 'Titillium Web', sans-serif;
    letter-spacing: 2px;
    margin: 0;
    margin-bottom: 30px;
}
h1#KoodiNakyma {
    width: 100%;
    text-align: center;
    font-size: 2em;
    color: var(--TeemaVari);
    font-family: 'Titillium Web', sans-serif;
    letter-spacing: 2px;
    position: fixed;
    z-index: 4;
}
#Koodi {
    position: fixed;
    width: 80%;
    margin-left: 10%;
    font-size: 1.5em;
    height: 40px;
    top: 0;
    margin-top: calc(50vh - 20px);
    padding-left: 20px;
    border: 0;
    border-bottom: 3px solid #ccc;
    color: #666;
    z-index: 5;
}
#Koodi::placeholder {
    color: #aaa;
}
#Sovellus {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}
#TallennaAllekirjoitus,
#TarkistaKoodi {
    position: fixed;
    bottom: 30px;
    right: 10%;
    background: var(--TeemaVari);
    color: white;
    border: 0;
    padding: 10px 20px;
    z-index: 10;
}
#TallennaAllekirjoitus:hover,
#TarkistaKoodi:hover {
    cursor: pointer;
    background: var(--TeemaVarjo);
}
#PeruutaAllekirjoitus,
#KirjauduUlos {
    display: block;
    position: fixed;
    bottom: 30px;
    left: 10%;
    border: 0;
    background: #eee;
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
}
#PeruutaAllekirjoitus:hover,
#KirjauduUlos:hover {
    cursor: pointer;
    background: #ddd;
}

#PiirtoNakyma {
    display: none;
    position: fixed;
    z-index: 100;
    width: 100%;
    height: 100%;
    background: white;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
canvas {
    width: 90%;
    margin-left: 5%;
    height: 80%;
    border: 1px solid var(--TeemaVari);
}
#PyyhiAllekirjoitusKentta {
    display: block;
    position: fixed;
    left: 50%;
    border: 0;
    background: #eee;
    color: #333;
    text-decoration: none;
    padding: 10px 20px;
}
#PyyhiAllekirjoitusKentta,
#PeruutaAllekirjoitus,
#TallennaAllekirjoitus {
    bottom: 10px;
}
#PyyhiAllekirjoitusKentta:hover {
    cursor: pointer;
    background: #ddd;
}
#TallennaAllekirjoitus {
    right: 5%;
}
#PeruutaAllekirjoitus {
    left: 5%;
}
#PiirtoTeksti {
    width: 100%;
    height: 50px;
    line-height: 50px;
    position: absolute;
    text-align: center;
    top: calc(40% - 25px);
    color: #aaa;
    font-size: 1.4em;
}
#Error {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 1000;
    color: var(--TeemaVari);
    display: none;
}

#Error span {
    position: fixed;
    height: 40px;
    line-height: 40px;
    bottom: calc(50vh - 20px);
    color: var(--TeemaVari);
    font-size: 1.3em;
    width: 100%;
    display: block;
    text-align: center;
}
#Asiakirjat {
    display: none;
    position: fixed;
    z-index: 100;
    width: 100%;
    height: 100%;
    background: white;
    padding: 10% 0%;
    overflow: auto;
    text-align: center;
}
#Asiakirjat b {
    font-size: 1.1em;
    color: #666;
    font-weight: normal;

    margin-top: 30px;
    display: block;
}
#Asiakirjat a {
    color: #333;
    margin-bottom: 10px;
    text-decoration: none;
    display: inline-block;
    padding: 0px 20px;
    transition: 300ms;
    background: #eee;
    border-radius: 30px;
    height: 35px;
    line-height: 35px;
    border-bottom: 1px solid var(--TeemaVari);
}
#Asiakirjat a:hover {
    cursor: pointer;
    transition: 300ms;
    color: var(--TeemaVari);
}
#AllekirjoitusPainike {
    color: white;
    margin-bottom: 10px;
    text-decoration: none;
    display: inline-block;
    padding: 0px 20px;
    transition: 300ms;
    background: var(--TeemaVari);
    border-radius: 30px;
    height: 35px;
    line-height: 35px;
    margin-top: 20px;
    border: 0;
    outline: none;
    font-size: 1.3em;
    opacity: 0.8;
}
#AllekirjoitusPainike:hover {
    cursor: pointer;
    transition: 300ms;
    opacity: 1;
}
.PageBreak {
  page-break-after: always;
}

.Paperi {
  position: relative;
  left: 0;
  top: 0;
  margin: 0;
  border: 0;
  padding: 0;
  width: 210mm;
  min-height: 297mm;
  box-shadow: none;
  border-radius: 0;
  page-break-before: always;
  overflow: hidden;
}
.Paperi table {
  width: 100%;
  max-width: 100%;
  border: 0px solid #000;
  position: relative;
  border-spacing: 0px;
  border-collapse: separate;
}
.Paperi table th {
  border: 0px;
  border-top: thin solid #000;
  border-left: thin solid #000;
  font-weight: bold;
  background: transparent;
  padding: 5px;
}
.Paperi table td,
.Paperi table th {
  border: 0px;
  border-top: thin solid #000;
  border-left: thin solid #000;
}
.Paperi table td {
  padding: 3px;
  background: white;
}
.Paperi table tr:last-of-type td:not(.ValiTd),
.Paperi table tbody tr:last-of-type th {
  border-bottom: thin solid #000;
}
.Paperi table tr th:last-of-type,
.Paperi table tr td:not(.ValiTd):not(.TyhjaRivi):last-of-type {
  border-right: thin solid #000;
}
.Paperi .PaperiKuva {
  max-width: 100%;
  max-height: 100%;
}
.Paperi .Otsikko {
  position: relative;
  width: 100%;
  display: block;
  top: initial;
  margin-bottom: 30px;
  left: initial;
  text-align: center;
  font-size: 1.5em;
}

.text-left {
  text-align: left !important;
}
@media screen and (orientation: portrait) {
    #Error {
        display: block;
    }
}
@media screen and (orientation: landscape) {
    #Error {
        display: none;
    }
}
