/*
 * SPDX-FileCopyrightText: 2024 Klasse & Methode - IT Kollektiv Stuttgart <member@klasse-methode.it>
 *
 * SPDX-License-Identifier: AGPL-3.0-only
 */

:root {
  --color-dark: #8335a0;
  --color-light: white;
  --color-grey: #515151;
  --color-grey-light: #ebcaf7;
  --color-grey-normal: #b1b1b1;
  --color-grey-dark: #515151;
  --spacing: 5;
  --spacing-1: calc(var(--spacing) * 1px);
  --spacing-2: calc(var(--spacing) * 2px);
  --spacing-4: calc(var(--spacing) * 4px);
  --spacing-8: calc(var(--spacing) * 8px);
  --spacing-16: calc(var(--spacing) * 16px);
  --spacing-32: calc(var(--spacing) * 32px);
  --spacing-64: calc(var(--spacing) * 64px);
  --spacing-72: calc(var(--spacing) * 72px);
  --spacing-76: calc(var(--spacing) * 76px);
  --height-header: 43px;
  --height-logo: 83px;
  --width-content: calc(var(--spacing-76) * 3 + var(--spacing-8) * 2);
  --container-border-radius: 7px;
}

* {
  margin: 0;
  padding: 0;
}

@font-face {
  font-family: "Roboto";
  font-display: swap;
  font-weight: 400;
  font-style: normal;
  src: url("/assets/fonts/Regular.ttf");
}
@font-face {
  font-family: "Roboto";
  font-display: swap;
  font-weight: 700;
  font-style: normal;
  src: url("/assets/fonts/Bold.ttf");
}
@font-face {
  font-family: "Roboto";
  font-display: swap;
  font-weight: 400;
  font-style: italic;
  src: url("/assets/fonts/Italic.ttf");
}
@font-face {
  font-family: "Roboto";
  font-display: swap;
  font-weight: 700;
  font-style: italic;
  src: url("/assets/fonts/BoldItalic.ttf");
}

html,
body {
  font-family: "Roboto", Helvetica, Arial, Sans-Serif;
  font-size: 16px;
  line-height: 1.3;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: inherit;
}

p a {
  text-decoration: underline;
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  letter-spacing: 0.7px;
  line-height: 1.3;
}

.clear {
  clear: both;
}

.hidden {
  display: none !important;
}

.error {
  width: fit-content;
  margin: auto;
  font-weight: 700;
  font-size: 22px;
}

.canceled {
  text-decoration: line-through;
}

.link-ical:before {
  display: inline-block;
  width: 1.3rem;
  height: 1.3rem;
  margin-right: 4px;
  margin-bottom: -4px;
  content: " ";
  background-image: url("/assets/images/icon_ical.svg");
  background-size: cover;
}
.link-rss:before {
  display: inline-block;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 4px;
  margin-bottom: -5px;
  content: " ";
  background-image: url("/assets/images/icon_rss.svg");
  background-size: contain;
}

.event,
.group,
.place,
#filter * {
  word-break: break-word;
}

/*
 * Container
 */
.container {
  display: block;
  width: 100%;
}
.container-header {
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  width: 100%;
  padding: 8px var(--spacing-4);

  background: var(--color-dark);
  color: var(--color-light);
  font-size: 1rem;
  font-weight: 700;
}
.container-header h1,
.container-header h2 {
  font-size: 1rem;
}

.container-subheader {
  box-sizing: border-box;
  width: 100%;
  padding-top: var(--spacing-2);
  background: white;

  font-size: 1.1rem;
}

.container-subheader:first-of-type {
  padding-top: var(--spacing-0);
}

.container-content {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-light);
  padding: var(--spacing-4);
}

.container-subcontent {
  width: 100%;
  box-sizing: border-box;
  background: var(--color-light);
  padding-top: var(--spacing-1);
  padding-bottom: var(--spacing-2);
  border-bottom: 1px solid var(--color-grey-light);
}
.container-subcontent:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.left {
  vertical-align: top;
}
.right {
  vertical-align: top;
}

.header {
  z-index: 9999;
  box-sizing: border-box;
  width: 100%;
  padding: var(--spacing-4);
  padding-top: 7px;
  padding-bottom: 7px;

  background: var(--color-dark);
  color: var(--color-light);
}

.header .left {
  display: flex;
  justify-content: space-between;
}

.header .left .title {
  font-size: 1rem;
}

.header .search {
  display: flex;
  width: calc(100% - 54px);
  height: 25px;
  border: 2px solid var(--color-light);
  padding-left: 8px;
  padding-right: 8px;
  margin-right: 8px;
}
.header .search input {
  display: block;
  height: 100%;
  width: 100%;
  box-sizing: border-box;
  border: none;

  background-color: var(--color-dark);
  color: var(--color-light);
  outline: none;
}
.header .search button {
  display: block;
  height: 20px;
  width: 20px;
  margin: 2px;
  border: none;
  background-color: var(--color-dark);
  cursor: pointer;
}

.header .search button img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.header .burger {
  display: block;
  box-sizing: border-box;
  height: 24px;
  width: 24px;
  cursor: pointer;
  margin-left: auto;
  margin-right: 0;
  margin-top: 2px;
  right: 0;
  width: 24px;
}

.header .burger span {
  background-color: var(--color-light);
  display: block;
  height: 3px;
  margin: 4px;
  width: 21px;
}

.header .right {
  display: none;
}

.header .right .burger-close span:first-child {
  transform: translateY(7px) rotate(45deg);
}

.header .right .burger-close span:last-child {
  transform: rotate(-45deg);
}

.header #nav {
  letter-spacing: 0.7px;
}
.header #nav:target {
  padding-left: 10px;
  padding-right: 10px;
  padding-top: 8px;
  padding-bottom: 16px;
}
.header #nav a.active {
  font-weight: 700;
}

.header nav li .dropdown {
  padding-top: 7px;
  font-size: 12px;
}
.leaflet-div-icon {
  background: transparent !important;
  background-image: url("/assets/dist/leaflet/images/marker-icon.png") !important;
  background-repeat: no-repeat !important;
  border: none !important;
}

.mobile-screenshot-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.mobile-screenshot {
  max-width: 230px;
  margin: 10px;
  border: 1px solid var(--color-grey);
}

.Button {
  padding: 4px 8px;
  border: 2px solid var(--color-dark);
  border-radius: 2px;
  background: var(--color-dark);
  color: var(--color-light);
  font-size: 14px;
  cursor: pointer;
}
.install-button {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 15px;
}

.action-container {
  display: flex;
  gap: var(--spacing-2);
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border: none;
  background: var(--color-light);
  text-decoration: underline;
  font-size: 16px;
  line-height: 1.3;
}

.share-btn:hover {
  cursor: pointer;
  filter: brightness(1.5);
}

.share-btn img {
  display: block;
  object-fit: contain;
  width: 20px;
  height: 20px;
}

.foreign-content {
  color: grey;
  font-size: 10px;
}

@media (max-width: 799px) {
  .only-desktop {
    display: none;
  }
  .header #nav:target {
    display: block;
  }
  .header #nav {
    z-index: 99;
    box-sizing: border-box;
    top: 0;
    left: 0;
    position: absolute;
    width: 100%;
    background-color: var(--color-dark);
    font-size: 18px;

    padding-left: 10px;
    padding-right: 10px;
    padding-top: 8px;
    padding-bottom: 16px;
  }
  .header #nav ul {
    text-align: center;
  }

  .header #nav ul li:not(:last-child) {
    margin-bottom: var(--spacing-2);
  }

  .sticky .header {
    position: fixed;
    top: 0;
  }

  .sticky .header .logo {
    display: none;
  }
  .sticky .content {
    margin-top: 126px;
  }

  .header .left {
    flex-wrap: wrap;
  }
  .header .logo {
    flex: 0 0 100%; /* flex-grow, flex-shrink, flex-basis */
  }
  .header .logo img {
    display: block;
    margin-top: 8px;
    margin-bottom: 8px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (min-width: 800px) {
  .only-mobile {
    display: none;
  }

  body {
    background: url(/assets/images/background.jpg);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    overflow-y: auto;
    height: 100%;
  }

  .header {
    position: sticky;
    top: 0;
    padding-left: var(--spacing-4);
    padding-right: var(--spacing-4);
  }
  .header .main {
    display: flex;
    justify-content: space-between;
  }
  .header .left {
    display: flex;
    align-items: center;
    justify-content: start;
    width: auto;
  }
  .header .search {
    margin-left: var(--spacing-2);
    margin-right: 0;
    height: auto;
    display: flex;
    align-items: center;
  }
  .header .search input {
    margin-bottom: 7px;
    margin-top: 7px;
  }
  .header .search button {
    height: 24px;
    width: 24px;
  }
  .header .burger {
    display: none;
  }

  .header .right {
    display: inline-block;
    width: var(--spacing-76);
    margin-left: var(--spacing-2);
  }
  .header nav.right ul {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
  }

  .header nav li .dropdown {
    display: none;
    background: black;
    margin-left: -10px;
    padding: 10px;
    padding-bottom: 3px;
  }
  .header nav li .dropdown ul {
    display: block;
  }
  .header nav li .dropdown ul li {
    margin-bottom: 7px;
  }
  .header nav li:hover .dropdown {
    display: block;
    position: absolute;
  }

  .header .logo img {
    width: 175px;
    object-fit: contain;
    vertical-align: middle;
  }
  .link-ical,
  .link-rss {
    display: block;
    margin-bottom: 7px;
  }
  .link-ical,
  .link-rss:last-child {
    display: block;
    margin-bottom: 0px;
  }
}

@media (max-width: 999px) {
  main .invert-order-mobile.main {
    display: flex;
    flex-flow: column;
  }
  main .invert-order-mobile.main .right {
    order: 1;
  }
  main .invert-order-mobile.main .left {
    order: 2;
  }
}

@media (min-width: 1000px) {
  .header .logo img {
    width: auto;
  }

  .container {
    margin-bottom: var(--spacing-8);
  }

  .container-header {
    border-radius: var(--container-border-radius) var(--container-border-radius) 0 0;
  }

  .container-content {
    border-radius: 0 0 var(--container-border-radius) var(--container-border-radius);
  }

  .header .logo {
    display: block;
  }
  .header .search {
    max-width: 300px;
  }

  .header .left .search {
    width: 100%;
    margin-left: var(--spacing-8);
    border: 2px solid var(--color-light);

    background: var(--color-dark);
  }
  .header .right {
    display: inline-block;
    margin-left: 0;
  }
  .header nav.right {
    color: var(--color-light);
  }

  .main {
    max-width: var(--width-content);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    display: flex;
  }

  .content {
    position: relative;
    box-sizing: border-box;
    padding-top: var(--spacing-8);
  }

  .left {
    vertical-align: top;
    display: inline-block;
    width: calc(var(--width-content) - var(--spacing-76) - var(--spacing-8));
  }
  .right {
    vertical-align: top;
    display: inline-block;
    width: var(--spacing-76);
    margin-left: var(--spacing-8);
  }
}

@media (min-width: 800px) {
  .header .left .title {
    display: none;
  }
}

@media (min-width: 800px) and (max-width: 1500px) {
  .header .right #backstage-link {
    display: none;
  }
}

@media (min-width: 1300px) {
  .header .left {
    justify-content: space-between;
    width: calc(var(--width-content) - var(--spacing-76) - var(--spacing-8));
  }

  .header .right {
    margin-left: var(--spacing-8);
  }
  .header .right #backstage-link {
    position: absolute;
    right: -115px;
  }
}

@media (min-width: 1500px) {
  .header .left .logo {
    margin-left: -68px;
    vertical-align: center;
  }
}

.loading-box {
  display: flex;
  justify-content: center;
}

/* Loading spinner */
.lds-ring {
  display: inline-block;
  position: relative;
  width: 40px;
  height: 40px;
  margin-bottom: var(--spacing-4);
}
.lds-ring div {
  box-sizing: border-box;
  display: block;
  position: absolute;
  width: 32px;
  height: 32px;
  margin: 4px;
  border: 4px solid black;
  border-radius: 50%;
  animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  border-color: black transparent transparent transparent;
}
.lds-ring div:nth-child(1) {
  animation-delay: -0.45s;
}
.lds-ring div:nth-child(2) {
  animation-delay: -0.3s;
}
.lds-ring div:nth-child(3) {
  animation-delay: -0.15s;
}
@keyframes lds-ring {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
