﻿@charset "UTF-8";
@import url('../../../source/css/global_site.css?v=20261110-3');
@import url('../../../source/css/page_header.css?v=20261111-2');
@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@600&display=swap');
/* ***********************************************************************
 *
 *  File:   common.css
 *
 *  Descr:  Common styles for the Švejk/Hašek document section.
 *          Fonts, body typography and design tokens come from the
 *          site-wide source/css/global_site.css.
 *
 *  Author: Jomar Hønsi, 2021-2026
 *
 * ************************************************************************/

:root {
    /* -------------------------------------------------------------------------
     * Layout & Sizing
     * ---------------------------------------------------------------------- */
    --content-width: 908px;
    --text-color: #333;
    --bg-color: #eec;

    /* -------------------------------------------------------------------------
     * Typography
     * (Inherits --main-font, --heading-font from global_site.css)
     * ---------------------------------------------------------------------- */
    --font-signature: "Times New Roman", serif;
    --font-serif: "Times New Roman", serif;
    --font-mono: "Courier New", monospace;
    --font-sans-alt: "Helvetica", sans-serif;

    /* -------------------------------------------------------------------------
     * Text & Global Accent Colors
     * ---------------------------------------------------------------------- */
    --fg-link: #06f;
    --fg-accent: #336;
    --fg-subtle: #345;
    --fg-muted: #666;
    --border-subtle: #ccc;

    /* -------------------------------------------------------------------------
     * Semantic Entity / Annotation Colors (used by document.php markup)
     * ---------------------------------------------------------------------- */
    --color-person: #743;
    --color-place: #338;
    --color-institution: rgb(18, 98, 17);
    --color-literature: #336;
    --color-unit: #363;
    --color-quote: #c00;
    --color-military: rgb(36, 75, 36);
    --color-date: #366;
    --color-ref-link: blue;

    /* -------------------------------------------------------------------------
     * Header & Navigation Controls
     * ---------------------------------------------------------------------- */
    --header-btn-bg: #eed;
    --header-btn-fg: #003;
    --header-btn-bg-hover: #eee;
    --header-btn-shadow: inset 0 0 10px #666;
    --header-btn-shadow-hover: inset 0 0 6px #99a;

    --nav-panel-bg: #f7f7e8;
    --nav-panel-border: #999;
    --nav-panel-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
    --nav-panel-subtext: #567;
    --nav-panel-divider: #ccb;

    --popup-select-bg: #f7f7e8;
    --popup-select-fg: #223;
    --popup-select-border: #999;
    --popup-select-focus: #6688aa;
    --popup-select-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);

    /* -------------------------------------------------------------------------
     * Document Containers & Callout Cards
     * ---------------------------------------------------------------------- */
    --bg-doc-box: rgb(243, 244, 242);
    --bg-intro-edition: #eeece3;
    --bg-notes-box: #eee;
    --bg-image-card: rgb(235, 231, 206);
    --shadow-image-card: inset 0 0 3px #999;
    --bg-links-td: rgb(226, 226, 158);

    /* -------------------------------------------------------------------------
     * Footnotes & Popups
     * ---------------------------------------------------------------------- */
    --fn-popup-bg: linear-gradient(160deg, #fdfbe8 0%, #f5f0c8 100%);
    --fn-popup-border: #a09060;
    --fn-popup-shadow: 2px 4px 16px rgba(0, 0, 0, 0.32);
    --fn-popup-num: #366;
    --fn-close-color: #39b42e;
    --fn-close-hover: #c00;

    --fn-target-bg: #b3bce6;
    --fn-target-border: #c79a00;
    --fn-target-shadow: 0 0 0 4px rgba(255, 224, 102, 0.55), 0 2px 6px rgba(80, 60, 0, 0.2);

    /* -------------------------------------------------------------------------
     * Radii & Layering
     * ---------------------------------------------------------------------- */
    --radius-sm: 3px;
    --radius-select: 4px;
    --radius-md: 5px;
    --radius-popup: 7px;
    --radius-lg: 8px;

    --z-nav-panel: 1000;
    --z-fn-popup: 9999;
    --z-spinner: 10000;
}

/*
* Generic style overrides
*/
body {
    color: var(--text-color);
}

html {
    scroll-padding-top: calc(var(--docs-header-h, 0px) + 8px);
}

h1 {
    text-align: center;
    clear: both;
    padding: 0;
    margin: 16px;
    font-size: 1.8em;
}

h2 {
    text-align: left;
    font-size: 1.3em;
}

h3 {
    font-size: 1.1em;
}

h4 {
    font-size: 1.0em;
}

a, a:hover, a:visited {
    text-decoration: none;
    color: var(--fg-link);
}

p {
    margin: 0 0 15px 0;
    padding: 0;
    text-align: justify;
}

ul {
    list-style-type: none;
    padding-left: 5px;
}

ul li {
    padding-left: 5px;
}

pre {
    font-family: var(--font-mono);
    padding: 0 0 15px 0;
    margin-bottom: -10px;
    white-space: pre-wrap;
    word-wrap: break-word;
}

em {
    color: var(--fg-accent);
}

/* Edition notes use .intro-edition > details > summary for native disclosure. */
.intro-edition {
    margin: 0 0 10px;
    padding: 10px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background-color: var(--bg-intro-edition);
    color: var(--fg-muted);
    font-size: 0.9em;
}

.intro-edition > details > summary {
    list-style: none;
    cursor: pointer;
    font-family: var(--heading-font);
    font-size: 1.2em;
    font-weight: bold;
    color: var(--fg-accent);
}

.intro-edition > details > summary::-webkit-details-marker {
    display: none;
}

.intro-edition > details > summary::before {
    content: "expand_more";
    display: inline-block;
    margin-right: 4px;
    font-family: "Material Icons";
    font-size: 1.1em;
    font-weight: normal;
    line-height: 1;
    vertical-align: -0.08em;
}

.intro-edition > details[open] > summary::before {
    content: "expand_less";
}

.intro-edition > details[open] > summary {
    margin-bottom: 10px;
}

.intro-edition > details > summary:focus-visible {
    outline: 2px solid var(--fg-accent);
    outline-offset: 2px;
}

/* 
* Application specific styles
*/
div.container {
    margin: 0 auto;
    width: 100%;
    max-width: var(--content-width);
    box-sizing: border-box;
    padding: 20px 24px;
    border-radius: 0;
    background-color: var(--bg-container);
    box-shadow: var(--shadow-container);
    font-size: 1em;
}

img {
    max-width: 100%;
    height: auto;
}

div.title {
    text-align: center;
}

.page-header {
    position: sticky;
    top: 0;
    z-index: 30;
    background: linear-gradient(var(--bg-header), var(--bg-header)), var(--bg-container);

    & a .material-icons {
        vertical-align: middle;
    }

    & button.menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: none;
        box-shadow: none;
        color: var(--header-btn-fg);
        cursor: pointer;
    }

    & button.menu-btn .material-icons {
        font-size: 22px;
    }

    & button.menu-btn:hover {
        background-color: rgba(0, 0, 0, 0.08);
        box-shadow: none;
    }

    & .nav-panel[hidden] {
        display: none;
    }

    & .nav-search {
        position: sticky;
        top: -4px;
        z-index: 1;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        gap: 6px;
        padding: 4px;
        background-color: var(--nav-panel-bg);
    }

    & .nav-search input {
        flex: 1;
        min-width: 0;
        box-sizing: border-box;
        padding: 6px 8px;
        border: 1px solid var(--nav-panel-border);
        border-radius: var(--radius-sm);
        font: inherit;
        font-size: 0.9em;
    }

    & .nav-search:has(.nav-root) input {
        order: 1;
        flex-basis: 100%;
    }

    & .nav-search button {
        flex-shrink: 0;
    }

    & .nav-search-empty {
        margin: 0;
        padding: 6px 10px;
        font-size: 0.9em;
        color: var(--nav-panel-subtext);
    }

    & .nav-panel a[hidden],
    & .nav-search input[hidden],
    & .nav-search-empty[hidden] {
        display: none;
    }

    & .nav-panel a {
        display: block;
        width: auto;
        margin: 0;
        padding: 6px 10px;
        border-radius: var(--radius-sm);
        background: none;
        box-shadow: none;
        text-align: left;
        font-size: 0.9em;
        color: var(--header-btn-fg);
    }

    & .nav-panel a:hover,
    & .nav-panel a:focus {
        background-color: var(--header-btn-bg);
        box-shadow: none;
    }

    & .nav-panel a.featured {
        background-color: #f6e9a8;
    }

    & .nav-panel a.featured:hover,
    & .nav-panel a.featured:focus {
        background-color: #faf0c0;
    }

    & .nav-panel a small {
        display: block;
        color: var(--nav-panel-subtext);
        font-size: 0.85em;
    }

    & .nav-panel a.nav-root {
        display: flex;
        align-items: center;
        margin-right: auto;
        font-weight: bold;
    }

    & .popup-mode {
        position: relative;
        font-size: 0.8em;
    }

    & .popup-mode .nav-panel {
        width: 200px;
    }

    & .popup-mode fieldset {
        min-width: 0;
        margin: 0;
        padding: 8px;
        border: 0;
    }

    & .popup-mode legend {
        font-weight: bold;
    }

    & .popup-mode label {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 6px 0;
        cursor: pointer;
    }
}

/* Page loading spinner, emitted by Document::navbar() and removed on window load (see the inline
   script alongside it); shown on every docs page since the navbar is common to all of them. */
#page-spinner {
    position: fixed;
    inset: 0;
    z-index: var(--z-spinner);
    background: rgba(14, 17, 14, 0.5);
}

#page-spinner>div {
    position: absolute;
    top: calc(50% - 28px);
    left: calc(50% - 28px);
    width: 56px;
    height: 56px;
    box-sizing: border-box;
    border: 8px solid #eec;
    border-top-color: rgb(109, 109, 179);
    border-radius: 50%;
    animation: page-spinner-spin 0.7s linear infinite;
}

@keyframes page-spinner-spin {
    to {
        transform: rotate(360deg);
    }
}

h2.name {
    text-align: center;
    font-size: 16px;
    color: var(--fg-subtle);
}

p.note {
    font-style: italic;
}

/* List of text items */
ol.theses {
    list-style-type: none;
    counter-reset: theses;
    padding-left: 20px;
}

ol.theses li {
    counter-increment: theses;
    text-align: justify;
    margin-bottom: 10px;
}

ol.theses li::before {
    content: counter(theses) ") ";
}

/* Tekststelle */
p.ts {
    font-family: var(--font-sans-alt);
    font-size: 12px;
}

/* Personenangabe */
span.person {
    color: var(--color-person);
}

/* Ortsangabe */
span.place {
    color: var(--color-place);
}

/* Institution */
span.inst {
    color: var(--color-institution);
}

/* Literature reference */
span.lit {
    letter-spacing: 1.2px;
    color: var(--color-literature);
    font-style: italic;
}

/* Units */
span.unit {
    color: var(--color-unit);
}

/* Quote */
span.sitat {
    color: var(--color-quote);
}

/* Military units */
span.mil {
    color: var(--color-military);
}

.document-attribution {
    clear: both;
    margin-top: 20px;
}

/* Signature */
p.signature {
    text-align: center;
    font-family: var(--font-signature);
    font-size: 1em;
    padding: 10px;
    margin: 0;

    & span {
        font-size: 0.8em;
        font-style: normal;
        letter-spacing: 1.5px;
    }
}

.header-signature p.signature {
    text-align: center;
    margin: 0;
    padding: 0 0 2px;
}

.header-signature .signature-publication {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 16px;
    height: 16px;
    margin-left: 0.35em;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--fg-link);
    vertical-align: middle;
    line-height: 1;
    cursor: help;
}

.header-signature .signature-publication .material-icons {
    font-family: 'Material Icons';
    font-size: 16px;
    font-style: normal;
    letter-spacing: normal;
    line-height: 1;
}

.header-signature .signature-publication-tooltip {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    z-index: var(--z-nav-panel);
    width: max-content;
    max-width: min(24rem, 80vw);
    padding: 6px 9px;
    border: 1px solid var(--popup-select-border);
    border-radius: var(--radius-sm);
    background: var(--popup-select-bg);
    box-shadow: var(--nav-panel-shadow);
    color: var(--popup-select-fg);
    font-family: var(--main-font, sans-serif);
    font-size: 13px;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    line-height: 1.35;
    text-align: center;
    white-space: normal;
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    pointer-events: none;
}

.header-signature .signature-publication:hover .signature-publication-tooltip,
.header-signature .signature-publication:focus-visible .signature-publication-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

p.pub-info {
    text-align: center;
    font-size: 0.9em;
    color: var(--fg-muted);
    margin: 5px;
}

p.copyright {
    text-align: center;
    font-size: 0.9em;
    color: var(--fg-muted);
    margin: 10px;
}

p.photo-credit {
    text-align: center;
    font-size: 0.85em;
    border-top: 1px solid var(--border-subtle);
    padding-top: 8px;
}

/* Image documentation etc. */
div.bdok, div.footnotes {
    margin: 0;
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-doc-box);
    border-radius: var(--radius-md);
    padding: 10px;
    font-size: 0.9em;
}

section.notes {
    margin: 0;
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-notes-box);
    padding: 10px;
}

div.diary {
    margin: 0 20px 0 20px;
    padding: 0 5px 0 5px;
}

figure.image {
    box-shadow: var(--shadow-image-card);
    border-radius: var(--radius-lg);
    margin: 0 10px 5px 10px;
    padding: 8px;
    background-color: var(--bg-image-card);
    max-width: 320px;
    float: right;

    & img {
        width: 100%;
    }

    & figcaption {
        padding: 10px 5px 5px 5px;
        text-align: center;
        font-size: 0.75em;
        color: var(--fg-accent);
    }

    & figcaption:empty {
        display: none;
    }
}

figure.image-custom {
    /* Placeholder for custom image styles, e.g. for filling the width of the document
    max-width: 100%;
    float: none;
    */
}

table.layout {
    width: 100%;
    text-align: center;
}

/* Links */
table.links {
    width: 100%;
    border: 1px solid var(--border-subtle);
}

table.links td:first-of-type {
    width: 50%;
}

table.links td {
    background-color: var(--bg-links-td);
    padding: 5px;
}

/* Fussnote */
div.footnotes {
    border-radius: 0px;
    font-size: small;
}

a.sup {
    color: var(--color-ref-link);
    font-size: 9pt;
    vertical-align: top;
    padding-left: 2px;
}

a.sup::before {
    content: "[";
}

a.sup::after {
    content: "]";
}

a.ref {
    margin-right: 5px;
    color: var(--color-ref-link);
    text-decoration: none;
    font-style: normal;
    font-weight: bold;
    font-size: small;
}

a.fn-source-target {
    background-color: var(--fn-target-bg);
    border: 1px solid var(--fn-target-border);
    border-radius: var(--radius-sm);
    font-weight: bold;
    box-shadow: var(--fn-target-shadow);
}

span.date {
    letter-spacing: 1.5px;
    color: var(--color-date);
}

span.quote {
    font-style: italic;
}

/*
* Footnote styles
*/
.fn-popup {
    display: none;
    position: fixed;
    z-index: var(--z-fn-popup);
    max-width: 380px;
    background: var(--fn-popup-bg);
    border: 1px solid var(--fn-popup-border);
    border-radius: var(--radius-popup);
    padding: 10px 25px 11px 15px;
    font-size: 16px;
    font-family: var(--font-serif);
    color: var(--text-color);
    line-height: 1.58;
    box-shadow: var(--fn-popup-shadow);
    pointer-events: none;
    box-sizing: border-box;
    max-height: calc(100vh - 16px);
    overflow-y: auto;
    overflow-wrap: anywhere;
}

.fn-popup.fn-wide {
    max-width: 760px;
}

.fn-popup.fn-wide {
    max-width: 760px;
}

.fn-popup.fn-sticky {
    pointer-events: auto;
}

.fn-popup.fn-visible {
    display: block;
}

.fn-popup-num {
    font-weight: bold;
    color: var(--fn-popup-num);
    margin-right: 5px;
}

.fn-close {
    position: absolute;
    top: 5px;
    right: 8px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    color: var(--fn-close-color);
    padding: 0;
    background: none;
    border: none;
    font-family: sans-serif;
    font-weight: bold;
}

.fn-close:hover {
    color: var(--fn-close-hover);
}

a.sup {
    cursor: help;
}

/*
* Responsive overrides for narrow screens (mobile phones/tablets)
*/
@media (max-width: 860px) {
    div.container {
        padding: 12px;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 15px;
    }

    div.container {
        margin: 0;
        border-radius: 0;
        box-shadow: none;
        font-size: 1em;
    }

    /* Floated images push the surrounding text into an unreadably
       narrow column on small screens; stack them full-width instead. */
    figure.image {
        float: none;
        max-width: 100%;
        margin: 0 0 10px 0;
    }

    div.diary {
        margin: 0 5px;
    }

    .fn-popup, .fn-popup.fn-wide {
        max-width: calc(100vw - 30px);
    }
}