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

#canvas {
    width: 100%;
    height: 100%;
    display: block;
}

@font-face {
    font-family: "AkkuratHelsanaTT Bold Web";
    src: url("fonts/AkkuratHelsanaTT-Bold.eot");
    src: url("fonts/AkkuratHelsanaTT-Bold.woff2") format("woff2"), url("fonts/AkkuratHelsanaTT-Bold.woff") format("woff");
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        display: none;
    }
}

.fadeOut {
    animation: fadeOut 2s ease-in-out;
    opacity: 0;
    pointer-events: none;
}

#loader {
    position: fixed;
    top: 0;
    width: 100%;
    height: 100%;
    background: #222222;
    z-index: 1000;
    background-color: white;
}

#loader img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: auto;
    min-width: 50%;
    min-height: 50%;
}
/* --------------------------------------------------------------------
   Info zum Molekuel: Knopf rechts unten, Popup im Glasstil.

   Die Regular-Schrift liegt nicht in diesem Ordner, sondern im Theme -
   von hier aus zwei Ebenen hoeher. Die Bold ist oben schon deklariert.
   -------------------------------------------------------------------- */

@font-face {
    font-family: "AkkuratHelsanaTT Regular Web";
    src: url("../../fonts/AkkuratHelsanaTT-Regular.woff2") format("woff2"),
         url("../../fonts/AkkuratHelsanaTT-Regular.woff") format("woff");
}

#info-knopf {
    position: fixed;
    right: 28px;
    bottom: 28px;
    z-index: 900;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    -webkit-backdrop-filter: blur(10px) saturate(140%);
    backdrop-filter: blur(10px) saturate(140%);
    color: #ffffff;
    font-family: "AkkuratHelsanaTT Bold Web", Helvetica, Arial, sans-serif;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

/*
 * Das "i" optisch einmitten.
 *
 * Der Flexbox-Kasten des <span> sitzt exakt in der Mitte des Knopfs - der
 * Buchstabe darin aber nicht. Im Zeilenkasten steckt unter der Grundlinie
 * Platz fuer Unterlaengen, und das kleine i hat keine. Nachgemessen in
 * AkkuratHelsanaTT Bold Web bei 19px (Canvas-Metriken): die Tinte reicht
 * 13,699px ueber die Grundlinie und 0px darunter, ihre Mitte liegt damit
 * 1,35px ueber der Knopfmitte. 1,35 / 19 = 0,071em, deshalb dieser Wert -
 * in em, damit er einer spaeteren Aenderung der Schriftgroesse folgt.
 *
 * Waagrecht stimmt es bereits: die Tinte des i liegt mittig in ihrer
 * Dickte (Mitte bei 2,717px von 5,434px), da ist nichts zu ruecken.
 */
#info-knopf span {
    display: block;
    transform: translateY(0.071em);
}

#info-knopf:hover,
#info-knopf:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.06);
    outline: none;
}

#info-box {
    position: fixed;
    right: 28px;
    bottom: 78px;
    z-index: 901;
    box-sizing: border-box;
    width: 380px;
    max-width: calc(100vw - 56px);
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding: 24px 26px 26px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.16);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 14px 44px rgba(90, 0, 35, 0.28);
    color: #ffffff;
    /* Startzustand der Einblendung; .ist-offen setzt sie zurueck. */
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

#info-box.ist-offen {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Ohne backdrop-filter (aeltere Browser) wuerde das Weiss auf dem hellen
   Teil des Verlaufs verschwinden - dann deckender fuellen. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    #info-knopf { background: rgba(120, 0, 45, 0.55); }
    #info-box { background: rgba(120, 0, 45, 0.78); }
}

#info-titel {
    margin: 0 0 10px 0;
    padding-right: 28px;
    font-family: "AkkuratHelsanaTT Bold Web", Helvetica, Arial, sans-serif;
    font-size: 19px;
    font-weight: normal;
    line-height: 1.3;
}

#info-text {
    font-family: "AkkuratHelsanaTT Regular Web", Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

#info-text p {
    margin: 0 0 12px 0;
}

#info-text p:last-child {
    margin-bottom: 0;
}

#info-text .info-hinweis {
    opacity: 0.85;
    font-size: 14px;
}

#info-zu {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 26px;
    height: 26px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ffffff;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

#info-zu:hover,
#info-zu:focus-visible {
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}

@media (max-width: 600px) {
    #info-knopf { right: 16px; bottom: 16px; }
    #info-box { right: 16px; bottom: 64px; max-width: calc(100vw - 32px); }
}

@media (prefers-reduced-motion: reduce) {
    #info-knopf, #info-box { transition: none; }
}
