/*****
 *Page layout
 */

@page {
  size: A4 portrait;
}

@page:right{
    @bottom-right {
        content: counter(page);
    }
}

@page:left{
    @bottom-left {
        content: counter(page);
    }
}


/***
 * Printing-specific alterations to general rules.
 */

a[href^="http://"]:after,
a[href^="https://"]:after {
    content: " [" attr(href) "]";
    color: #888; font-weight: bold; font-size: 9pt;
    word-wrap: break-word;
}

div#object_description a[href^="http://"]:after,
div#object_description a[href^="https://"]:after,
aside a[href^="http://"]:after,
aside a[href^="https://"]:after {
    content: "";
}

/*****
 * Structuring and ever-recurring elements
 */

body { font-size: 12pt; }

h2 { font-size: 18pt; }
h3 { font-size: 14pt; }
h4 { font-size: 12pt; }

#leftBar,
#leftbar_bottom,
#randomImageBar,
body > footer    { display: none !important; }

header#mainHeader     { background: #FFF; border-bottom: 3pt solid #D6D6D6; }
header#mainHeader .branding .aufklapper,
header#mainHeader nav { display: none !important; }
.branding             { width: 100%; }
.branding *           { display: inline-block !important; }
header a:after        { content: initial !important; }

header#pageTitle    { display: block; }
header#pageTitle h2 { display: block; font-weight: bold; border-bottom: 2pt solid #D6D6D6; }

h3, p { margin-top: .4em; margin-bottom: .4em; }

#bcTrail { font-size: 9pt; }

td.optionCell > img,
td.optionCell > a > img,
img[src="db_images_gestaltung/oak.png"],
img[src="db_images_gestaltung/hourglass.png"],
.gogif:before { display: none !important; }

img[src="db_images_gestaltung/.png"] { opacity: 0; }

.imageTiles > li { display: block; margin: 0 0 0 0; padding: 0;
                   background: initial; list-style: disc; font-size: initial; border-bottom: 1pt solid #D6D6D6; }
.imageTiles > li div { position: relative; bottom: initial; background: initial; color: #000; }
.imageTiles > li img { display: none !important; }
.imageTiles > li > a { min-height: initial; }

.searchGrid > * { min-width: 5cm; max-width: 6cm; page-break-inside: avoid; }
.searchGrid > * > a { height: 1.2cm; }

/*****
 * Main / Parts
 */

header,
body > main, body > section { padding-left: 0 !important; padding-right: 0 !important; }

/*****
 * Specific pages
 ***
 * Object pages
 */

figure#objectMainImage { display: inline-block !important; }
#objectImages img      { max-height: 2cm; }
#objectMainImage img   { max-height: 5cm; }

#objectImages             { display: table; text-align: left; }
#objectImages > *,
#objectMainImage          { display: table-cell; vertical-align: top; }
.objektimage_overview     { text-align: right; width: calc(200px + 2em); }
.objektimage_overview > * { display: inline-block !important; position: relative;
                            width: calc(100px + .5em); height: calc(100px + .5em);
                            margin-left: .3em; padding: 0 .25em .25em .25em;  }
#objectImages .objektimage_overview > * > * { position: absolute; left: 50%; top: 50%;
                                              max-width: 3cm; max-height: 2cm; margin: 0;
                                              transform: translate(-50%, -50%); }

#objectMainImage figcaption { position: relative; right: initial; top: initial; bottom: initial; }

#objLegalInfo p:first-child { border-top: 3pt solid #D6D6D6; }

.objserie img,
.objserie div a span:last-child,
.objrels img[src="db_images_gestaltung/info.png"],
#objLegalInfo h3,
#runReferences,
#objectOptions,
#objectvisualizations { display: none !important; }

.objrels,
#objLegalInfo { page-break-inside: avoid; }

.citeLegalTiles > * { width: auto; border-width: 0; }
.iconLicence:before { display: none !important; }
.citeLegalTiles > * > *:first-child { padding-left: .5em; }

section#objectOrigInstitution,
section#objSimilarObjects { display: none !important; }

/***
 * Institution and collection and exhibition and event pages
 */

html#exhibition main > aside:last-child,
html#event main > aside:last-child,
#institution aside#options { display: none !important; }

html#exhibition main > aside:first-child { max-width: 4cm; }
html#event main + section,
html#exhibition main + section { page-break-before: always; }

#exhibitionsLists,
#exhibitionsLists > div:first-child { display: block; width: initial; }

#institution body > main.withAside         { display: block; }

#institution section#museum_objects .iconList > li { display: none; }
#institution section#museum_objects .iconList > li:first-child { display: block; }

#institution section#museum_objects aside { display: none !important; }

/***
 * Overview pages
 */

#museums main > aside,
#collections main > aside { display: none !important; }

ul.collectionList > li     { display: block; page-break-inside: avoid; }
ul.collectionList > li > a { display: block; flex: initial; width: initial;
                             background: initial; color: initial; font-weight: bold;
                             border-bottom: 2pt solid #D6D6D6; }
ul.collectionList > li > ul    { border-left-width: 0; list-style: none; }
ul.collectionList > li img     { display: none !important; }

#exhOvList li { page-break-inside: avoid; }

/*****
 * Search page
 */

div.navigationsfuntionen,
div#navigationsleiste_bottom,
a[href="#extendedSearch"] { display: none; }

/*****
 * Home / start page
 */

#home #pageTitle { display: none !important; }
#home #tiles     { display: block; box-shadow: initial; }
#home #tiles > * { display: block; flex: initial; }

#home body > section:last-of-type { display: none !important; }

/*****
 * Topics page
 */

section.tileswithtext { display: block; page-break-inside: avoid; }
section.tileswithtext > div { display: block; width: auto; }
section.tileswithtext > div div:first-child { display: none !important; }

/*****
 * Timeline / People /  People to people
 */

#maintimeline > div { page-break-inside: avoid; }
.vocabularies_tiles > * { display: block; flex: initial;
                          width: 100%; margin: 6pt 0 !important; page-break-inside: avoid; }

.vocabularies_relations_single_entry { counter-reset: objsBetweenPeople; }
.vocabularies_relations_single_entry > div:nth-child(1) { width: 80%; }
.vocabularies_relations_single_entry > div:nth-child(1) > span:nth-child(2) > a:last-child { display: none; }
.vocabularies_relations_single_entry > div:nth-child(2) > div > a:before { counter-increment: objsBetweenPeople; display: inline-block; content: "["  counter(objsBetweenPeople) "]"; }
.vocabularies_relations_single_entry > div:nth-child(2) > div > a >img   { display: none; }
