/* Based off of:
   http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)

   See comment on line 53 for complete Licensing info
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* The rest of this file is licensed under the project-wide license.
*/

/* Headings */
@font-face {
    font-family: 'Racing Sans One';
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src:
        local("RacingSansOne"),
        local("Racing Sans One"),
        url(/static/fonts/RacingSansOne-Regular.woff2) format('woff2'),
        url(/static/fonts/RacingSansOne-Regular.ttf) format('truetype');
}

/* Regular body */
@font-face {
    font-family: 'Roboto Slab';
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src:
        local("RobotoSlab"),
        local("Roboto Slab"),
        url(/static/fonts/RobotoSlab-Regular.woff2) format('woff2'),
        url(/static/fonts/RobotoSlab-Regular.ttf) format('truetype');
}

/* Sans-serif */
@font-face {
    font-family: 'Roboto';
    font-style: normal;
    font-weight: 400;
    font-display: optional;
    src:
        local("Roboto"),
        url(/static/fonts/Roboto-Regular.woff2) format('woff2'),
        url(/static/fonts/Roboto-Regular.ttf) format('truetype');
}

/* TODO: Monospace - IosevkaTermSlabMono */

:root {
    --primary-color: #9c98d6;
    --primary-color-dark: #5c57a0;
    --primary-color-light: #b5b4d6;
    --secondary-color: #F6AF65;
    --secondary-color-light: #f7d1a9;
    --secondary-color-lighter: #f7e1cb;
    --gray-light: #e0e0e0;
    --text-color: #505050;
    --background-color: #ffffff;
    --info-color-text: #505050;
    --info-color-border: #446bb8;
    --info-color-background: #c0cbff;
    --error-color-text: #C00000;
    --error-color-border: #C00000;
    --error-color-background: #FFc0c0;
    --warn-color-text: #000000;
    --warn-color-border: #F6AF65;
    --warn-color-background: #f7d1a9;

    --header-line-height: 3rem;
}

body {
    font-family: "Roboto Slab", serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background-color);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Racing Sans One", sans-serif;
    font-weight: 400;
    line-height: 1.2;
    margin-top: 1em;
}

header,
header *,
form,
form *,
table.fancy,
a[href].fancy {
    font-family: "Roboto", sans-serif;
}

b,
strong,
label,
.warn,
.error,
a[href],
form fieldset.radio legend,
table.fancy th {
    font-weight: 700;
}

span {
    display: inline-block;
}

p {
    margin-top: 1em;
}

h1 {
    font-size: 250%;
    font-variant-caps: small-caps;
}

h2 {
    font-size: 200%;
}

h3 {
    font-size: 150%;
}

h4 {
    font-size: 125%;
}

a[href] {
    color: var(--primary-color-dark);
    text-decoration: none;
}

a[href]:hover {
    text-decoration: underline;
}

a[href].fancy {
    display: block;
    width: fit-content;
    margin: 2rem;
    padding: 1rem;
    border: 0.3rem solid var(--secondary-color);
    border-radius: 0.5rem;
    color: 0.5rem solid var(--text-color-strong);
    background: linear-gradient(12deg, rgba(247, 225, 203, 1) 0%, rgba(247, 209, 169, 1) 50%, rgba(246, 175, 101, 1) 100%);
}

a[href].fancy:hover {
    border: 0.3rem solid var(--secondary-color-light);
    border-radius: 0.5rem;
    background: linear-gradient(24deg, rgba(247, 225, 203, 1) 0%, rgba(247, 209, 169, 1) 50%, rgba(246, 175, 101, 1) 100%);
    text-decoration: none;
}

img {
    width: 100%;
}

small,
.small {
    font-size: 80%;
    line-height: 1.2;
}

b,
strong {
    color: oklch(from currentColor calc(l - 0.15) c h);
}

i,
em {
    font-style: italic;
}

.info {
    margin: 0.3rem auto;
    padding: 0.2rem;
    border: 0.1rem dotted var(--info-color-border);
    background-color: var(--info-color-background);
    color: var(--info-color-text);
}

.warn {
    margin: 0.3rem auto;
    padding: 0.2rem;
    border: 0.1rem dotted var(--warn-color-border);
    background-color: var(--warn-color-background);
    color: var(--warn-color-text);
}

.error {
    margin: 0.3rem auto;
    padding: 0.2rem;
    border: 0.1rem dotted var(--error-color-border);
    background-color: var(--error-color-background);
    color: var(--error-color-text);
}

.info:empty,
.warn:empty,
.error:empty {
    display: none;
}

td,
th {
    padding-left: 1rem;
}

tr>:first-child {
    padding-left: 0;
}

th {
    text-align: left;
}

table.fancy th {
    color: var(--text-color-strong);
    text-align: center;
}

table.fancy td,
table.fancy th {
    padding: 0.4rem 0.6rem;
}

table.fancy>thead th {
    background-color: var(--secondary-color);
}

table.fancy>tbody tr:nth-child(odd) {
    background-color: var(--secondary-color-lighter);
}

table.fancy>tbody tr:nth-child(even) {
    background-color: var(--secondary-color-light);
}

table.numerical td,
table *.numerical td,
table td.numerical  {
    text-align: right;
}

table.textual td,
table *.textual td,
table td.textual {
    text-align: left;
}

form {
    background: var(--secondary-color-lighter);
    padding:1em;
}

label {
    display: inline-block;
    padding-top: 0.5em;
    color: var(--text-color-strong);
}

div:has(input[hidden]) {
    display: none;
}

form textarea {
    width: 100%;
}

form fieldset {
    padding: 0.5em 0.5em;
    margin: 0.5em 0;
    border: 2px solid var(--secondary-color-light);
}

form fieldset legend {
    margin-top: 0.5em;
    line-height: 1.2;
    font-size: 150%;
}

form fieldset fieldset {
    border: 2px solid var(--secondary-color);
    background: var(--secondary-color-light);
}

form fieldset fieldset legend {
    font-size: 125%;
}

form fieldset.radio {
    border: none;
    padding: initial;
}

form fieldset.radio legend {
    margin: initial;
    line-break: initial;
    font-size: initial;
    color: var(--text-color-strong);
    padding-top: 0.5em;
}

form fieldset.radio label {
    padding-top: 0;
}

input,
button,
textarea {
    font-size: 125%;
    border: 2px solid var(--secondary-color);
}

input:user-invalid,
button:user-invalid,
textarea:user-invalid {
    font-size: 125%;
    border: 2px solid var(--error-color-border);
}

.required::after,
div:has(>input[required])>label::after {
    content: " *";
    color: var(--error-color-text)
}

form:has(label>input[required])::before {
    content: "Povinné údaje sú vyznačené *";
    color: var(--error-color-text)
}

header {
    position: sticky;
    top: 0;
    width: 100%;
    display: flex;
    column-gap: 1rem;

    background-color: var(--primary-color);
    font-size: 110%;
}

header>#logo,
header>#logo img{
    height: var(--header-line-height);
}

header>nav {
    display: flex;
    height: 100%;
    flex-wrap: wrap;
}

header>nav>a {
    display: flex;
}

header>.burger {
    display: none;
}

header>nav>a[href],
header>.burger {
    align-items: center;
    height: var(--header-line-height);
    padding: 0 0.5em;
    color: var(--text-color-strong);
    text-decoration: none;
}
header>nav>a:hover,
header>.burger:hover {
    background-color: var(--primary-color-light);
}

main>* {
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

main>*.wide {
    max-width: unset;
    overflow: scroll;
}

main>*.wide>* {
    margin: auto;
}

@media only screen and (max-width: 600px) {

    main {
        margin-top: var(--header-line-height);
    }

    header {
        position: fixed;
        right: 0;
        width: fit-content;
        min-width: 10rem;

        border-radius: 0 0 0 0.5rem;
    }

    header>nav>a:hover,
    header>.burger:hover {
        border-radius: 0.5rem 0 0 0.5rem;
    }

    header,
    header>nav {
        flex-direction: column;
    }

    header>.burger {
        display: flex;
    }

    header>nav,
    header>#logo {
        display: none;
    }

    header>#menu-toggle:checked + .burger + nav {
        display: block;
    }
}
