/*----------------------------------------------------------------------
Description: Main stylesheet of "Happy CNTer" on www.BitRotation.de
Author: Marco Lammert

Copyright © 2017-2020 by Marco Lammert
----------------------------------------------------------------------*/

/*----------------------------------------
  Resets and overrides
----------------------------------------*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*----------------------------------------
  General Styles
----------------------------------------*/

:root {
  color-scheme: light dark;

  --debug-border-color: #000;

  --bitrotation-grey: #878787;

  --primary-text-color: #000;
  --hover-color: #fff;
  --active-color: #00b200;
  --indicator-color: #bbb;
  --legal-statement-color: #cccccc;
  --flex-footer-text-color: #797979;

  --internal-link-color: #0096ff;
  --internal-link-hover-color: #3affd7;
  --external-link-color: #b76777;
  --external-link-hover-color: #d65021;
}

/* Web font: "Noto Sans" */

@font-face {
  font-family: "Noto Sans";
  src: url(../../resources/web-fonts/Noto_Sans/NotoSans-Regular.ttf);
}

@font-face {
  font-family: "Noto Sans";
  src: url(../../resources/web-fonts/Noto_Sans/NotoSans-Bold.ttf);
  font-weight: bold;
}

@font-face {
  font-family: "Noto Sans";
  src: url(../../resources/web-fonts/Noto_Sans/NotoSans-Italic.ttf);
  font-style: italic;
}

@font-face {
  font-family: "Noto Sans";
  src: url(../../resources/web-fonts/Noto_Sans/NotoSans-BoldItalic.ttf);
  font-weight: bold;
  font-style: italic;
}

body {
  font-family: "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  /*font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;*/

  font-size: medium;
  line-height: 1.5em;
  margin: 0;
}

/*
h1:first-child { margin-top: 0em; }
*/

h1 {
  font-size: 1.4em;
  font-weight: 600;

  margin-top: 2em;
  margin-bottom: 0.5em;
}

/*
h2:first-child { margin-top: 0em; }
*/

h2 {
  font-size: 1.1em;
  font-weight: 600;

  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h3 {
  font-size: 1em;
  font-weight: 600;

  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

p {
  margin-top: 1em;
}

blockquote {
  margin: 1em 0 1em 0;
  padding: 0.5em 1em 0.5em 1em;
  border-left: 4px solid var(--bitrotation-grey);
}

/*----------------------------------------
  Menu
----------------------------------------*/

.menu-container {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */
  padding: 20px 0;

  display: flex;
  justify-content: center;
}

a.svg:after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}

a.svg {
  position: relative;
  display: inline-block;
}

.happy-cnter-logo {
  width: 50px;
  height: auto;
  margin-right: 10px;
}

.logo-and-nav-icon {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* For debugging */
/* Commented because... 'Do not use empty rulesets' */
/*#links {
  border: 1px solid var(--debug-border-color);
}*/

.menu-expanded {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  display: flex;
  align-items: center;
}

.menu-closed {
  display: none;
}

#ocram-one-logo {
  width: auto;
  height: 1.25em;

  text-decoration: none;
  display: block;
}

#menu-toggle {
  cursor: pointer;
}

.menu-toggle-on {
  display: initial;
}

.menu-toggle-off {
  display: none;
}

div.menu-icon {
  width: 2em;
  height: 0.3em;
  background-color: #cd0000;
  margin: 0.35em 0;
}

/*----------------------------------------
  (Menu) Button/Links
----------------------------------------*/

.button {
  margin: 0 10px;
  padding: 0.4em 1em;
  font-weight: bold;

  color: var(--bitrotation-grey);

  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}

div.button:hover {
  color: var(--hover-color);
  background: var(--bitrotation-grey);

  border-top: 2px solid var(--bitrotation-grey);
  border-bottom: 2px solid var(--bitrotation-grey);
  border-radius: 2px;
}

#links a:link {
  text-decoration: none;
}

div.button.active {
  color: var(--bitrotation-grey);

  border-top: 2px solid transparent;
  border-bottom: 2px solid var(--active-color);
}

div.button.active:hover {
  color: var(--hover-color);
  background: var(--active-color);

  border-top: 2px solid var(--active-color);
  border-bottom: 2px solid var(--active-color);
  border-radius: 2px;
}

/*----------------------------------------
  Main content
----------------------------------------*/

.content-container {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  display: flex;
  justify-content: center;
}

.content {
  display: block;
}

.text-content {
  width: 100%;

  justify-content: center;
}

/* # Term -> Description */
/*
      right | default (left aligned)
    --------+-----------------------  
    Telefon: +49 40 23686986
     E-Mail: Info(at)BitRotation.de
*/
.entity-term-description-entries {
  display: table !important;
}

.entity-term-description-entries-rows {
  display: table-row;
}

.entity-term-entries {
  text-align: right;

  display: table-cell;
}

.entity-description-entries {
  padding-left: 0.5em;

  display: table-cell;
}

/*----------------------------------------
  Screenshots
----------------------------------------*/

.screenshot {
  height: auto;
  max-width: 100%;
}

/* Caption text */
.screenshot-caption {
  font-size: 0.9em;
  margin: 1em 0;
  width: 100%;
  text-align: left;
}

.in-device-screenshot {
  width: 100%;
  height: auto;

  max-width: 460px;
}

/* The dots/bullets/indicators */
.indicator-panel {
  text-align: center;
}

.indicator {
  cursor: pointer;
  height: 1em;
  width: 1em;
  margin: 0 0.5em;
  border: solid 2px var(--indicator-color);
  border-radius: 50%;
  display: inline-block;
  transition: background-color 0.6s ease;
}

.indicator-active {
  background-color: var(--indicator-color);
}

/*----------------------------------------
  Slideshow
----------------------------------------*/

.slideshow-relative-wrapper {
  position: relative;

  margin: 0;
  padding: 0;
}

.slideshow-absolute-wrapper {
  position: absolute;
  left: 0;
  top: 0;
}

.slides {
  width: 100%;
  height: auto;

  transition: opacity 1s ease-in-out;
  opacity: 0;
  filter: alpha(opacity=0);
}

.slides h2:first-child {
  margin-top: 0;
}

.slides:first-child {
  margin-top: 1.5em;
}

.slideshow-relative-wrapper .opaque {
  opacity: 1;
  filter: alpha(opacity=1);
}

.horizontally-centered {
  display: flex;
  justify-content: center;
}

.card-hc {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  background-color: var(--card-background-color);

  border-radius: 4px;
  box-shadow: 0px 3px 6px rgba(0, 0, 0, 0.16), 0px 3px 6px rgba(0, 0, 0, 0.23);

  padding: 0 2em;

  display: flex;
  flex-direction: column;
  align-items: center;
}

.card-hc-background-lm-screenshot-2 {
  background: linear-gradient(#ff5146, #dd2204);
}

.card-hc-background-lm-screenshot-3 {
  background: linear-gradient(#66a2ff, #205cb6);
}

.card-hc-background-lm-screenshot-4 {
  background: linear-gradient(#91f4d5, #4aefbf);
}

.card-hc-background-lm-screenshot-5 {
  background: linear-gradient(#ffea7f, #ffde2a);
}

.card-hc-background-lm-screenshot-6 {
  background: linear-gradient(#f7a0bd, #f26696);
}

.card-app-hc-text {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  margin: 1em 0em;

  display: flex;
  flex-direction: column;

  text-align: center;

  /*
  This text will be placed on a light colored background
  therefore do not differentiate between light and dark mode.
  The contrast between white text and some of those colors (e.g. yellow)
  is not pleasant to read.
  */
  color: black;
}

.card-hc-heading {
  font-size: 1.4em;

  margin-top: 0;
  margin-bottom: 0.15em;
}

.card-hc-subheading {
  font-size: 1em;
  font-weight: 300;

  margin-top: 0.15em;

  color: var(--card-subheading-text-color);
}

.card-hc-screenshot {
  width: 100%;
  height: auto;

  max-width: 340px;
}

.card-hc-img {
  display: block;
}

/*----------------------------------------
  Footer
----------------------------------------*/

footer {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  width: 100%;
  padding: 0 1em;

  display: flex;
  justify-content: center;
}

.footer-links a:link {
  text-decoration: none;
  color: var(--primary-text-color);
}

.footer-links a:hover {
  background-color: #797979;
  color: var(--hover-color);

  /*font-weight: bold;*/
}

.footer-links a:visited {
  color: var(--primary-text-color);
}

.footer-links a:visited:hover {
  color: var(--hover-color);
  background-color: #797979;
}

.flex-footer {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  margin-top: 3em;
  padding: 1em 2em 2em 2em;
  color: var(--flex-footer-text-color);
  font-size: 0.75em;
  border-top: 1px solid #797979;

  display: flex;
  flex-direction: column;

  width: 100%;
}

.mandatory-legal-statement-container {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */

  color: var(--legal-statement-color);
  text-align: center;

  display: flex;
  flex-direction: column;
  justify-content: center;
}

.mandatory-legal-statements {
  display: flex;
  justify-content: center;
}

.copyright {
  /*border: 1px solid var(--debug-border-color);*/ /* For debugging */
  margin-top: 2em;

  display: flex;
  justify-content: center;
}

/*----------------------------------------
  Misc
----------------------------------------*/

/*.space-right-small {
  padding-right: 2em;
}*/

.correction-necessary {
  text-decoration: line-through;
}

.attention {
  border: 2px solid #ffbb33;
  border-radius: 4px;

  margin: 1em 0em;
  padding: 1em;

  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.attention-sign {
  width: auto;
  height: 3em;
  margin: 0 1em 1em 0;
}

/*----------------------------------------
  Media Queries
----------------------------------------*/

@media (prefers-color-scheme: dark) {
  :root {
    --primary-text-color: #fff;
  }
}

/* ## Mobile Styles */
/*@media screen and (max-width: 400px) {*/
/* 960 / 16 = 60 */
@media screen and (max-width: 600px) {
  /*1024*/

  .menu {
    width: 100%;

    flex-direction: column;
  }

  .menu-expanded {
    width: 100%;
    flex-direction: column;
  }

  .menu-closed {
    display: none;
  }

  .button {
    margin: 1em 0;
  }

  .home {
    text-align: center;
    /*width: 80%;*/
  }

  .support {
    text-align: center;
    /*width: 100%;*/
  }

  .contact {
    text-align: center;
    /*width: 80%;*/
  }

  .imprint {
    text-align: center;
    /*width: 80%;*/
  }

  .text-content {
    padding: 0 1em;
  }
}

/* ## Tablet Styles */
/*@media screen and (min-width: 601px and max-width: 1024px) {

}*/

/* ## Test */
@media only screen and (min-width: 601px) and (max-width: 1024px) {
  .logo-and-nav-icon {
    width: auto;

    justify-content: flex-start;
  }

  .menu {
    width: 100%;

    flex-direction: row;
    align-items: center;
  }

  .menu-toggle-on {
    display: none;
  }

  .menu-closed,
  .menu-expanded {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }

  .button {
    font-size: 0.9em;
    margin: 0 1.5em 0 0;
    padding: 0.25em 0.5em;
  }

  .text-content {
    max-width: 40em;
    padding: 0 1em;
  }

  .flex-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  .mandatory-legal-statement-container {
    display: flex;
    flex-direction: row;

    justify-content: flex-start;
  }

  .mandatory-legal-statements:not(:last-child) {
    padding-right: 2em;
  }

  .copyright {
    margin-top: 0;
  }
}

/* iPad (portrait) ----------- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: portrait) {
  .logo-and-nav-icon {
    width: auto;

    justify-content: flex-start;
  }

  .menu {
    width: 100%;

    flex-direction: row;
    align-items: center;
  }

  .menu-toggle-on {
    display: none;
  }

  .menu-closed,
  .menu-expanded {
    display: flex;
    flex-direction: row;
    justify-content: center;
  }

  .button {
    font-size: 0.9em;
    margin: 0 1.5em 0 0;
    padding: 0.25em 0.5em;
  }

  .text-content {
    width: 40em;
    padding: 0 1em;
  }

  .flex-footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  .mandatory-legal-statement-container {
    display: flex;
    flex-direction: row;

    justify-content: flex-start;
  }

  /*.mandatory-legal-statements {
    padding-right: 2em;
  }*/

  .mandatory-legal-statements:not(:last-child) {
    padding-right: 2em;
  }

  .copyright {
    margin-top: 0;
  }

  .attention {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }
}

/* iPads (landscape) ----------- */
@media only screen and (min-device-width: 768px) and (max-device-width: 1024px) and (orientation: landscape) {
  #ocram-one-logo {
    width: auto;
    height: 1.5em;
  }

  .logo-and-nav-icon {
    width: auto;
  }

  .menu {
    width: 900px;

    flex-direction: row;
  }

  .menu-toggle-on {
    display: none;
  }

  .menu-closed,
  .menu-expanded {
    display: flex;
    flex-direction: row;
  }

  .button {
    font-size: 0.9em;
    margin: 0 0 0 1em;
    padding: 0.25em 0.5em;
  }

  .text-content {
    width: 40em;
    padding: 0 1em;
  }

  .flex-footer {
    width: 900px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  .mandatory-legal-statement-container {
    display: flex;
    flex-direction: row;

    justify-content: flex-start;
  }

  .mandatory-legal-statements:not(:last-child) {
    padding-right: 2em;
  }

  .copyright {
    margin-top: 0;
  }

  .attention {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }
}

/* ## Desktop Styles */
@media screen and (min-width: 1025px) {
  #ocram-one-logo {
    width: auto;
    height: 1.5em;
  }

  .logo-and-nav-icon {
    width: auto;
  }

  .menu {
    width: 900px;

    flex-direction: row;
  }

  .menu-toggle-on {
    display: none;
  }

  .menu-closed,
  .menu-expanded {
    display: flex;
    flex-direction: row;
  }

  .button {
    font-size: 0.9em;
    margin: 1.5em 0 1.5em 1em;
    padding: 0.25em 0.5em;
  }

  .text-content {
    width: 40em;
    padding: 0 1em;
  }

  .flex-footer {
    width: 900px;

    display: flex;
    flex-direction: row;
    justify-content: space-between;
  }

  .mandatory-legal-statement-container {
    display: flex;
    flex-direction: row;

    justify-content: flex-start;
  }

  /*.mandatory-legal-statements {
    padding-right: 2em;
  }*/

  .mandatory-legal-statements:not(:last-child) {
    padding-right: 2em;
  }

  .copyright {
    margin-top: 0;
  }

  /* Die Behandlung des hover-Zustandes führt auf dem iPhone und iPad zum Problem:
      der (per Touch-Auswahl manuell herbeigeführte) 'selektierte' Zustand bleibt dann
      bei dem ausgewählten Indikator/Punkt bestehen und es sind dann, sobald die Dia Show
      automatisch weitergeht, zwei Indikatoren/Punkte farbig markiert ...
      
      Durch diesen Media Query sollten iPhone und iPad ausgeschlossen sein ...
    */
  span.indicator:hover {
    background-color: var(--indicator-color);
  }

  .attention {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
  }
}

/* # Textbox */

.text-box {
  border-width: 1px;
  border-style: solid;

  padding: 1.5em;
  margin: 4em 0 0 0;

  font-size: 0.9em;
}

/*----------------------------------------
  Trademarks
----------------------------------------*/

.text-box-markenzeichen {
  border-color: #797979;
}

.markenzeichen-heading {
  color: rgb(146, 147, 149);
  font-weight: bold;
  margin-bottom: 1em;
}

/* # Press Kit */
a.internal-download-link {
  color: var(--internal-link-color);
}

a.internal-download-link:hover {
  color: var(--internal-link-hover-color);
}

a.external-link,
a.external-link:visited {
  color: var(--external-link-color);
}

a.external-link:hover,
a.external-link:visited:hover {
  color: var(--external-link-hover-color);
}
