/***
General
***/

:root {
  --md-primary-fg-color: rgb(21, 68, 255);
  --md-accent-fg-color: rgb(32, 50, 87);
  --md-text-font: "Open Sans";
  --md-shadow-z1: none;
  --md-shadow-z2: none;
  --md-shadow-z3: none;
  --md-code-bg-color: #c8d3ff;
  /* --md-admonition-icon--info: url('data:image/svg+xml;charset=utf-8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <circle cx="12" cy="12" r="12" fill="#1544ff" style="stroke-width:0.857204" /> <path d="M 12.000858,13.030274 V 5.8463978" stroke="#ffffff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /> <path d="m 12,19.184828 c 0.850175,0 1.539367,-0.689192 1.539367,-1.539367 0,-0.850175 -0.689192,-1.539367 -1.539367,-1.539367 -0.85026,0 -1.539453,0.689192 -1.539453,1.539367 0,0.850175 0.689193,1.539367 1.539453,1.539367 z" fill="#ffffff" style="stroke-width:0.857204" /></svg>'); */
  /* --md-admonition-icon--warning: url('data:image/svg+xml;charset=utf-8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" version="1.1" id="svg3" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg"> <g transform="translate(0.095066,-0.47467534)"> <path d="M 17.1377,1.43703 0.908781,28.4833 c -0.399944,0.6665 0.080167,1.5145 0.857479,1.5145 H 34.0436 c 0.7751,0 1.2556,-0.8437 0.86,-1.5103 L 18.8552,1.44125 C 18.4689,0.790182 17.5272,0.787868 17.1377,1.43703 Z" fill="#eb702e" /> <path d="M 18,19.2009 V 10.8203" stroke="#ffffff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" /> <path d="m 17.999,26.3807 c 0.9918,0 1.7958,-0.804 1.7958,-1.7958 0,-0.9918 -0.804,-1.7958 -1.7958,-1.7958 -0.9919,0 -1.7959,0.804 -1.7959,1.7958 0,0.9918 0.804,1.7958 1.7959,1.7958 z" fill="#ffffff" /></g></svg>') */
}

html {
  overflow-y: scroll;
}

/***
Schriftarten einbetten
***/

@font-face {
  font-family: "Space Grotesk";
  color: #ffffff;
  src: local("SpaceGrotesk"),
    url("fonts/SpaceGrotesk.ttf") format("truetype");
  font-weight: normal;
}

@font-face {
  font-family: "Open Sans";
  color: #ffffff;
  src: local("OpenSans"),
    url("fonts/OpenSans.ttf") format("truetype");
  font-weight: normal;
}

/****
Titlebar
***/

.md-header__inner {
  padding: .2rem;
}

.md-logo img {
    height: 50px !important;
    width: 50px !important;
}

@media screen and (min-width: 60em) {
  .md-header__source {
    background: white;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 10% 100%);
    padding: 0;
    position: absolute;
    right: -105px;
    width: 150px;
    transition: transform 0.3s ease;

    &:hover {
      transform: translateX(-105px);
    }
  }

  .md-source .logo-openCode {
    float: right;
  }
}

@media screen and (max-width: 59.9844em) {
  .md-nav__source {
    background-color: white;
  }
}

@keyframes horizontal-shaking {
  0% { transform: translateX(0) }
  25% { transform: translateX(5px) }
  50% { transform: translateX(0) }
  75% { transform: translateX(5px) }
  100% { transform: translateX(0) }
}

.bounce {
  animation: horizontal-shaking 1s;
}

/***
Nav & TOC
***/

@media screen and (min-width: 60em) {
  .md-sidebar__inner > .md-nav {
    border: 1px solid #d9dbdf !important;
    border-radius: 8px !important;
    overflow: none !important;

    &.md-nav--primary {
      background-color: #e9edff !important;
    }

    &.md-nav--secondary {
      background-color: #f8faff !important;
    }
  }

  .md-nav__title {
    font-family: 'Space Grotesk';
    font-size: 1rem;
    color: #131f30;
    background: none !important;
    box-shadow: none !important;
    margin: 1rem 0;

    & svg {
      box-sizing: inherit;
      vertical-align: middle;
      margin-right: 0.35rem;
    }
  }

  .md-nav__link:hover {
      color: var(--md-primary-fg-color) !important;
    }

  .md-nav__list > .md-nav__item {
    margin: 1rem 0;
  }

  /* elements of level 2*/
  .md-nav__item--nested .md-nav__list,
  .md-nav__list[data-md-component="toc"] .md-nav__list {
    font-size: 0.65rem;
    margin-bottom: 0.5rem 0 !important;
  }

  /* Remove margin of last element */
  .md-nav__item--nested .md-nav__list .md-nav__item:last-child,
  .md-nav__list[data-md-component="toc"] .md-nav__list .md-nav__item:last-child {
    margin-bottom: 0 !important;
  }

  .md-nav__item .md-nav__item--nested.md-nav {
    border: none !important;
    margin: none !important;
  }
}

/* hiding the nav-icon when viewport-size is under 60em */
@media screen and (max-width: 59.9844em) {
  .md-nav svg {
    display: none;
  }
}

/***
Inhalte
***/

.md-typeset {
  & p {
    color: rgb(19, 31, 48);
    font-size: 1em;
    font-family: 'Open Sans';
  }

  & img {
    border: 1px solid #b6bcc8;
    border-radius: 8px;
    width: auto;
    margin: 0.5rem auto;
  }
}

  
/***
Überschriften
***/

.md-typeset {
  line-height: 1.5;

  & a {
    color: rgb(21, 68, 255);
  }

  & h1, h2, h3, h4 {
    font-weight: bold;
  }

  & h1 {
    color: rgb(19, 31, 48);
    font-family: 'Space Grotesk';
    font-size: 2rem;
  }

  & h2 {
    color: rgb(21, 68, 255);
    font-family: 'Space Grotesk';
    font-size: 1.5rem;
    line-height: 2.5;
  }

  & h3 {
    font-family: 'Space Grotesk';
    font-size: 1rem;
  }
}

/***
Hero for the Landingpage
***/

.md-typeset .hero {
  background: linear-gradient(90deg,
                rgb(32, 50, 87) 0%,
                rgb(21, 68, 255) 90%);
  border-radius: 8px;
  color: white;
  padding: 5rem 2rem;
  text-align: center;

  & h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
  }

  & p {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }

  & button.btn-hero {
    border: 2px solid #004b87;
    border-radius: 4px;
    background: rgb(21, 68, 255);

    & a {
      color: white;
    }
  }

  & button.btn-hero-reverse {
    border: 2px solid #004b87;
    border-radius: 4px;
    background: white;

    &:hover {
      background: #e9edff;
      color: white;
    }

    & a{
      color: #004b87;
    }
  }
}

.md-typeset .landingpage-logo {
  float: right;
  border: none;
  width: 30%;
  z-index: -1; /* Bild hinter anderen Elementen */
}

/***
Code-Blöcke
***/

.highlight {
  border: 1px solid #b6bcc8;
  border-radius: 8px;
  
  & pre {
    margin: 0;
    border-radius: 8px;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
  }

  & span.filename {
    font-family: 'Space Grotesk';
    margin-top: 0;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
  }

  & > pre  >code {
    border-radius: 8px;
  }
}

.highlight {
  & .md-clipboard.md-icon {
    background: none;
    display: block;
    margin-bottom: 10px;
    width: 100%;
    
    &::after {
      float: right;
      color: var(--md-accent-fg-color);
    } 
  }
}

/***
Admonitions
***/

.md-typeset div.admonition {
  background-color: #F8FAFF !important;
  border-radius: 8px;
  box-shadow: none;
  margin: 2rem 0;
  padding: 1rem;
  border: 1px solid #1544ff !important;
  color: rgb(32, 50, 87);
  font-size: 0.7rem;

  & .admonition-title {
    background-color: #F8FAFF !important;
  }
}

.md-typeset .admonition.info:focus-within, .md-typeset details.info:focus-within {
  box-shadow: none !important;
}

div.admonition.warning {
  border-color: #EB702E !important;

  & .admonition-title::before {
    background-color: #EB702E;
    -webkit-mask-image: var(--md-admonition-icon--warning);
    mask-image: var(--md-admonition-icon--warning);
  }
}

details.info {
  background: none;
  border-left: none;
  border-radius: 0;
  border-right: none;
  border-bottom: none;
  border-top: 1px solid #1544ff !important;

  &:last-of-type {
    border-bottom: 1px solid #1544ff !important;

    & summary {
      margin-bottom: 1rem;
    }
  }

  & summary {
    background: none !important;
    margin: 1rem 0 0 0;
    font-size: 1rem;
  }

  & summary::before {
    display: none !important;
  }
}

/***
Forms
***/

.md-typeset {
  & button {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #007bff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;

    &:hover {
      background-color: #0056b3;
      box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    }

    &:focus {
      outline: none;
      box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
    }

    &:active {
      background-color: #004085;
    }

    /* Responsive design */
    @media (max-width: 600px) {
      padding: 10px 20px;
      font-size: 14px;
    }
  }

  /* reset the clipboard-button
  because the style is inherited by the general button theme

  - removing the background
  - changing color
  */
  & button.md-clipboard {
      background: none;
      box-shadow: none;
      color: var(--md-primary-fg-color);
      margin: 0;
      padding: 0;
      
      &:hover {
        box-shadow: none;
        background: none;
      }
  }

  & input,
  textarea {
    border-width: 1px;
    border-color: #8f959f;
    border-style: solid;
    border-radius: 5px;
    box-shadow: none;
    box-sizing: border-box;
    padding: 16px 20px;
    font-size: calc(1rem * 1.20);
    background-color: #ffffff;
    color: #131f30;
    display: block;
    appearance: none;
    width: 100%;
    line-height: 1;
    transition: border-color 220ms ease-in-out, border-width 220ms ease-in-out, outline 220ms ease-in-out;
    margin-bottom: 32px;

    &:focus {
      border-color: #000000 !important;
      border-radius: 5px;
      outline: none !important;
      border-width: 2px;
      padding: 16px 20px;
    }

    &::placeholder {
      font-family: "Open Sans";
      color: #000000;
    }

    @media (max-width: 600px) {
      padding: 10px 20px;
      font-size: 14px;
    }
  }

  & textarea {
    min-height: 100px;
  }

  & label {
    accent-color: rgb(0, 230, 204);
    box-sizing: border-box;
    color: rgb(19, 31, 48);
    display: block;
    font-family: "Open Sans";
    font-size: 16px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;

    &.required:after {
      color: rgb(19, 31, 48);
      content: "*";
    }
  }
}

/***
Footer
***/

.md-footer div.md-copyright__highlight {
  display: table;
  width: 100%;
  table-layout: fixed;

  & span {
    display: table-cell;
    text-align: left;
  }
}

.md-footer .hosted-by svg {
  vertical-align: middle;
  width: 18px;
  margin-left: 5px;
  margin-right: 5px;
}