@import url('https://fonts.googleapis.com/css2?family=Noto+Serif:wght@400;700&display=swap');

code {white-space: pre-wrap;}
span.smallcaps {font-variant: small-caps;}
span.underline {text-decoration: underline;}
q { quotes: "“" "”" "‘" "’"; }

body {
    padding: 0px;
    margin: 0px;
    background-color: #F6F6F6;
    color: #03071E;
    font-family: 'Noto Serif', serif;
}

#content {
    padding: 1em;
    max-width: 90em;
    margin: auto;
    hyphens: auto;
    text-align: justify;
}

.large {
    font-size: 150%;
}

@media ( max-width: 94em ), ( max-device-width: 94em ) {
    #content {
        max-width: none;
    }
}

@media ( max-width: 50em ), ( max-device-width: 50em ) {
    #content {
	padding: 0.6em;
    }
}
@media ( max-width: 40em ), ( max-device-width: 40em ), ( max-height: 30em ) {
    #content {
	text-align: initial;
    }
    .large {
	font-size: 100%;
    }
}


.headfoot {
    background-color: #9D0208;
    color: #F6F6F6;
}

#header {
    position: sticky;
    top: 0;
    padding: 1em;
    font-size: 115%;
    font-weight: bold;
    display: flex;
    z-index: 2;
}

#header img {
    max-height: 1.5ex;
    vertical-align: baseline;
}

.menuleft {
    margin-right: auto;
}

.menuright {
    margin-left: auto;
}

#foother {
    padding: 0.8em 1em;
    font-size: 80%;
    color: #D3D3D3;
    text-align: center;
}

a:link, a:visited, a:active { text-decoration: underline; color: #D00000; }
a:link:hover, a:visited:hover, a:active:hover { text-decoration: underline; color: #E85D04; }

h1, h2, h3, h4 { color: #9D0208; }
h1 { font-size: 135%; }
h2 { font-size: 120%; }
h3 { font-size: 107%; }
h4 { font-size: 100%; }

hr {
    border: none;
    height: 1.5em;
    background-image: url("img/srdiecka-dlouha.png");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

ul {
    position: relative;
    list-style: none;
    padding-left: 3em;
}
ul li::before {
    position: absolute;
    left: 0em;
    content: '';
    display: inline-block;
    height: 1.5em;
    width: calc(1.5em * 384 / 210);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    background-image: url("img/srdiecka.png");
}

.center { text-align: center; }

.bigimg-wrap {
    /* make sure the foto cat be fitted and centered if the vewport is too
     * narrow */
    position: relative;
    margin: auto;
    max-width: max-content;
}

img.bigimg {
    max-width: 100%;
    /* fit the photo to narrow viewport (the subtracted value corresponds to
     * size of headers and margins */
    max-height: calc(100vh - 6rem);
}

#top-photo {
    display: grid;
}

#top-photo img {
    grid-column: 1;
    grid-row: 1;
    z-index: -1;
    width: auto;
    height: auto;
}

#top-photo img.selected {
    z-index: 0;
}

.timeline { position: relative; }
.timeline h1, .timeline h2, .timeline h3, .timeline h4 { margin-top: 0px; }
.timeline h3 { margin-left: 1.8em; }

.timeline .content::after {
    content: '';
    position: absolute;
    width: 0.3em;
    border-radius: 0.25em;
    background-color: #9D0208;
    top: 0;
    bottom: 0;
    left: 1em;
}

.timeline .item {
    padding: 1.5em 0em 1.5em 3em;
    position: relative;
    background-color: inherit;
}

/* dot on timeline */
.timeline .item::after {
    content: '';
    position: absolute;
    width: 1.4em;
    height: 1.4em;
    left: calc(1em + (0.3em / 2) - (1.4em / 2)); /* 1 + (half 0.3 (bar width)) - (half 1.4 (dot width)) */
    top: 1.6em; /* .item top padding + .item.content top padding + manual alignment to baseline (0.1em) */
    box-sizing: border-box; /* include borders in size */
    background-color: #F6F6F6;
    border: 0.3em solid #9D0208;
    border-radius: 50%;
    z-index: 1;
}

/* a "pointer" towards timeline */
.timeline .item::before {
    content: " ";
    height: 0;
    position: absolute;
    top: 1.5em; /* dot's top + half of differece between dot height and "pointer" height */
    width: calc(1.5em * 384 / 210);
    height: 1.6em;
    z-index: 1;
    left: 1.8em;
    /* left: 2.5em; /* item left padding (3em) - this border width */
    background-image: url("img/srdiecka.png");
    background-repeat: no-repeat;
    background-size: contain;
}

.timeline .item p:last-of-type {
    margin-bottom: 0px;
}


.collapsible {
    margin: 0.5em 0;
    background-color: #E8E8E8; /* TODO */
}

.collapsible input[type='checkbox'] { display: none; }
.collapsible label {
    display: block;
    background-color: #D3D3D3; /* TODO */
    cursor: pointer;
    padding: 0.4em;
    transition: all 0.25s ease-out;
}
.collapsible label:hover {
    background-color: #B1A7A6; /* TODO */
}

.collapsible label::before {
    content: ' ';
    display: inline-block;

    border-top: 0.4em solid transparent;
    border-bottom: 0.4em solid transparent;
    border-left: 0.4em solid currentColor;

    vertical-align: middle;
    margin-left: 0.2em;
    margin-right: 0.7em;
    transform: translateY(-2px);

    transition: transform .2s ease-out;
}

.collapsible .collapsed {
    overflow: hidden;
    max-height: 0px;
    /* transition: max-height .25s ease-in-out; */
}
.collapsible .collapsed p {
    padding: 0.5em;
    margin: 0;
}
.collapsible input:checked + label + .collapsed {
    max-height: max-content;
}
.collapsible input:checked + label::before {
    transform: rotate(90deg) translateX(-0.2em);
}
/* active label */
.collapsible input:checked + label {}

.withnote {
    text-decoration: underline #B1A7A6 dashed from-font;
}

#timer {
    position: relative;
    z-index: 0;
}

#timer .time {
    position: absolute;
    width: 100%;
    top: 0;
    visibility: hidden;
}

#timer .time div, #timer .quote div {
    margin: 0.5rem 0;
    color: #F6F6F6;

    background-color: #9D020877;
    padding: 0.4em;
    text-align: center;
}

#timer .quote {
    position: absolute;
    width: 100%;
    bottom: 0;
}


/* language switcher */
.langswitch {
  position: relative;
  display: inline-block;
}

.langswitch > span {
  position: absolute;
  top: 0.15rem;
  pointer-events: none;
  font-weight: bold;
  font-size: 80%;
  text-transform: uppercase;
  width: 50%;
  text-align: center;
}

input.check-toggle-round-flat:checked ~ .off {
  color: #E85D04;
}

input.check-toggle-round-flat:checked ~ .on {
  color: #F6F6F6;
}

.langswitch > span.on {
  left: 0;
  padding-left: 0.1rem;
  color: #E85D04;
}

.langswitch > span.off {
  right: 0;
  padding-right: 0.2rem;
  color: #F6F6F6;
}

.check-toggle {
  display: none;
}
.check-toggle + label {
  display: block;
  position: relative;
  cursor: pointer;
  outline: none;
  user-select: none;
}

input.check-toggle-round-flat + label {
  padding: 0.15rem;
  width: 4rem;
  height: 1.4rem;
  background-color: #E85D04;
  border-radius: 1.4rem;
}
input.check-toggle-round-flat + label:hover {
  background-color: #D00000;
}

input.check-toggle-round-flat + label:before, input.check-toggle-round-flat + label:after {
  display: block;
  position: absolute;
  content: "";
}

input.check-toggle-round-flat + label:before {
  top: 0.15rem;
  left: 0.15rem;
  bottom: 0.15rem;
  right: 0.15rem;
  background-color: #E85D04;
  border-radius: 0.7rem;
}
input.check-toggle-round-flat + label:hover:before {
  background-color: #D00000;
}
input.check-toggle-round-flat + label:after {
  top: 0.2rem;
  left: 0.25rem;
  bottom: 0.2rem;
  width: 1.9rem;
  background-color: #F6F6F6;
  border-radius: 2em;
  transition: margin 0.2s;
}

input.check-toggle-round-flat:checked + label {
}

input.check-toggle-round-flat:checked + label:after {
  margin-left: 1.9rem;
}

#language-toggle-guard {
  display: none;
}

.box {
  height: 20px;
  width: 20px;
  display: inline-block;
  margin-bottom: -5px;
}

.red0 {
  background-color: #6A040F;
}

.red1 {
  background-color: #9D0208;
}

.red2 {
  background-color: #D00000;
}

.red3 {
  background-color: #DC2F02;
}

.orange0 {
  background-color: #E85D04;
}

.orange1 {
  background-color: #F48C06;
}

.orange2 {
  background-color: #FAA307;
}

.yellow {
  background-color: #FFBA08;
}


/* defaults */
.cz { display: initial; }
.sk { display: none; }

.map-box {
    margin: auto;
    position: relative;
    width: 100%;
    /* padding percent size is always relative to width, so use this as a hack
     * to defined map size */
    padding-bottom: max(33vh, min(33%, 66vh));
}
.map {
    /* size inside .map-box (including padding) */
    position: absolute;
    width: 100%;
    height: 100%;
}
