/*   
Theme Name: ostermaier.online new dark
Theme Slug: ostermaier-online-newdark
Theme URI: https://ostermaier.online
Text Domain: ostermaier-online
Description: Dark template for ostermaier.online
Author: Matthias Ostermaier
Author URI: https://ostermaier.online
Version: 1.0
*/

/*************************************************************************************************************
   Layout specific to ostermaier.online
*************************************************************************************************************/

/* Import styles not only relevant to the front end, but also to the WP block editor. ***********************/
@import url("css/editor-relevant-styles.css");

html {
  margin: 0;
  padding: 0;
  width: 100%;
  background-position: left bottom;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

html.standard {
  background-image: url("images/mo_straight_photo.png");
  background-size: 526px 768px;
}

html.broccoli {
  background-image: url("images/broccoli_single_photo.png");
  background-position: 64px bottom;
  background-size: 400px 370px;
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

main {
  /* relative positioning needed for Chrome */
  position: relative;
  clear: both;
  
  margin: 4% 8% 8.0em 38%;
  padding: 0;
}

/* navigation formatting ************************************************************************************/

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 3.2em;
  
  width: 660px;
  z-index: 100;
}

div.footer-nav-1-wrapper {
  display: flex;
  position: absolute;
  right: 0;
  text-align: right;
}

div.footer-nav-1-wrapper nav {
  display: flex;
  align-items: center;
  flex-direction: row-reverse; /* accomodates the reverse order in footer.php */
  vertical-align: text-bottom;
}

/* 
 * Menu items are aligned from right to left.
 * This selector, combined with the following one, selects the 
 * rightmost item (that appears first in the source code.
 */
html.standard div.footer-nav-1-wrapper nav > li.not-current-menu-item { 
  width: 182px;
}

html.standard div.footer-nav-1-wrapper nav > li.not-current-menu-item ~ li.not-current-menu-item { 
  width: auto;
}

/* 
 * Menu items are aligned from right to left.
 * This selector, combined with the following one, selects the 
 * rightmost item (that appears first in the source code.
 */
html.broccoli div.footer-nav-1-wrapper nav > li.not-current-menu-item { 
  width: 212px;
}

html.broccoli div.footer-nav-1-wrapper nav > li.not-current-menu-item ~ li.not-current-menu-item { 
  width: auto;
}

/* hide the contents of sharrif but occupy the space */
div.shariff-placeholder * {
  visibility: hidden;
}

div.shariff {
  vertical-align: text-bottom;
  background-color: var(--background);
}

ul.shariff-buttons {  
  align-items: center !important;
  flex-flow: inherit !important; /* makes the buttons stick in one line */
  height: 100%;
}

nav a {
  margin-right: 1.0em;
  white-space: nowrap;
  background-color: var(--background);
}

li.menu-item {
  display: inline-block;
  list-style: none;
  white-space: nowrap;
}

li.current-menu-item {
  display: none;
}

/* content formatting ***************************************************************************************/

p {
  text-align: justify;
  margin: 0 0 1.2em 0;
}

ul {
  padding-left: 2.0em;
  list-style-type: square;
  margin: 0 0 1.2em 0;
}

li {
  padding-left: 0.4em;
  margin-bottom: 0.4em;
}

h1 {
  margin-top: 3.2em;
  margin-bottom: 1.8em;
}

h2 {
  margin-top: 3.2em;
  margin-bottom: 1.4em;
}

h3 {
  margin-top: 1.6em;
  margin-bottom: 1.0em;
}

h4 {
  margin-top: 1.2em;
  margin-bottom: 0.8em;
}

figure.logo {
  display: inline-block;
  border-bottom: 2px solid var(--middleground);
}

figure.logo img {
  position: relative;
  margin-bottom: 0.4em;
}

.printOnly {
  display: none;
}

/* bullet-box layout *******************************************************************************************/

.bullet-box {
  display: inline-block;
  vertical-align: top;
  width: 100%;
  height: 100%;
  font-size: 0.84em;
  border-right: 2px solid var(--highlight);
  border-bottom: 2px solid var(--area-dark);
  border-left: 2px solid var(--area-dark);
  border-radius: 1.2em;
}

.bullet-box ul {
  padding-left: 1.0em;
  margin: 1.0em;
}

.bullet-box li {
  margin-bottom: 0;
}

.bullet-box h2 {
  margin: 0 0 1.0em 0;
  padding: 0.2em 0.8em 0.2em 1.0em !important;
  vertical-align: text-top;
  border-bottom: 0;
  font-size: 1.0em;
  background-color: var(--area-dark);
  border-top: 1px solid var(--highlight);
  border-top-left-radius: 1.2em;
  border-top-right-radius: 1.2em;
}

/* layout and formatting for specific media (modern browsers only) ******************************************/

@media screen and (max-width: 1440px) {
  
  html, 
  html.standard, 
  html.broccoli {
    background-image: none;
    background-size: unset;
  }
  
  main {
    max-width: 100%;
    margin: 6%;
  }
  
  footer {
    position: relative;
    width: auto;
    padding: 1.0em 0.8em 0.8em 0.8em;
  }

  div.footer-nav-1-wrapper {
    display: block;
    position: relative;
    text-align: left;
  }
  
  div.footer-nav-1-wrapper nav {
    display: inline-flex;
  }
    
  html.broccoli div.footer-nav-1-wrapper nav > li.not-current-menu-item { 
    width: auto;
  }

  html.standard div.shariff {
    margin-left: 0;
  }
  
  div.shariff {
    display: inline-block !important;
  }
  
  div.shariff,
  ul.shariff-buttons {
    height: auto;
  }
  
}

@media print {
  @page {
    size: portrait;
    margin: 2.0cm 1.5cm 2.0cm 2.5cm;
  }
  
  html {
    background-image: none !important;
  }
  
  main {
    max-width: 100%;
    margin: 0;
  }
  
  footer {
    display: none;
  }
    
  .printOnly {
    display: inherit;
  }
}
