@import url("plex-font.css");
@import url("fa-font.css");

:root {
    --highlight: #356799;
    --white: color-mix(in hsl, var(--highlight), white 99%);
    --body-font: "IBM Plex Serif", serif;
    --heading-font: "IBM Plex Sans", sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    font-family: var(--body-font);
    line-height: 1.8;
    color: #222;
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


header,
footer {
    width: 100%;
    max-width: 70rem;
    margin: 0 auto;
    padding: 0.5em 0em;
}

header {
    margin: 0 auto;
    padding: 1rem 1.5rem;

    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: bold;

    border-bottom: 1px solid var(--highlight);
}

footer {
    border-top: 1px solid var(--highlight);
    text-align: center;
}

main {
    width: 100%;
    max-width: 70rem;
    margin: 0 auto;
    padding: 1.5rem;
    flex: 1;
}

h2,
h3 {
    margin: 0 0 0.5em;
    line-height: 1.2;
    font-family: var(--heading-font);
    font-weight: bold;
}

p {
    margin: 0 0 1em;
}

a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 0.05em;
    text-underline-offset: 0.2em;
}

label {
    font-weight: 600;
}

button {
    font-family: var(--heading-font);
    font-size: 1rem;
    padding: 0.4em 1em;
    border: 2px solid #222;
    background: transparent;
    cursor: pointer;
}

button:hover {
    background: var(--highlight);
    color: var(--white);
}


select,
input[type="number"] {
    font-family: var(--body-font);
    font-size: 1rem;
    padding: 0.3em 0.5em;
    border: 2px solid #222;
    background: white;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.duration-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.duration-inputs input[type="number"] {
    width: 5rem;
}

.teilnehmer-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.teilnehmer-row .grade-select {
    flex: 1;
    min-width: 0;
}

.teilnehmer-row .step-wrap {
    flex-shrink: 0;
}

.teilnehmer-row .anzahl-input {
    width: 4.5rem;
    flex-shrink: 0;
}

.teilnehmer-row .remove-btn {
    flex-shrink: 0;
    border-color: transparent;
    font-size: 1.2rem;
    padding: 0.2em 0.5em;
}

.teilnehmer-row .remove-btn:hover {
    border-color: #222;
    background: transparent;
}

#teilnehmerHinzufuegen {
    margin-top: 0.25rem;
}

#ergebnis {
    position: relative;
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--highlight);
    color: var(--white);
}

#ergebnis h2 {
    margin-bottom: 0.25rem;
}

#gesamtkosten {
    text-align: center;
    font-size: 4vw;
    margin: 0;
    font-family: var(--heading-font);
}

#linkKopieren {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1rem;
    cursor: pointer;
}

#linkKopieren:active {
    opacity: 0.6;
}

[popover] {
    padding: 0.5em;
    background: color-mix(in hsl, var(--highlight), white 90%);
    color: black;
    font-family: var(--heading-font);
    font-weight: bold;
    font-size: 1.5rem;
    border: 0.1em solid black;
}

@media (min-width: 600px) {
    header,
    main,
    footer {
        padding-inline: 2rem;
    }
}

@media (min-width: 1200px) {
    header,
    main,
    footer {
        padding-inline: 3rem;
    }
}
