*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: Verdana, sans-serif !important;
}

body {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-body);
  overflow: scroll;
  height: 100%;
}

h1, h2, h3 {
  font-weight: normal;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

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

  a:focus, .event:focus, .event:hover, a:hover, *:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
  }

.content {
  max-width: 800px;
  width: 100%;
  flex-grow: 1;
  margin: auto;
  padding: 20px;
  /*background: var(--bg-container);*/
  /*border-radius: 8px;*/
  /*box-shadow: 0 0 10px var(--shadow-color);*/
}

.calendar {
  max-width: 800px;
  margin: auto;
  background: var(--bg-container);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px var(--shadow-color);
}

  .calendar abbr {
    cursor: help;
    text-decoration: none;
  }

  .calendar h2 {
    text-align: center;
    margin-bottom: 20px;
  }

.grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}

.day-name {
  padding: 10px;
  border-radius: 4px;
  background-color: var(--border-neutral);
  font-weight: bold;
  text-align: center;
  color: white;
}

.day {
  background-color: #f9f9f9;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  position: relative;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 100px;
  max-width: 100px;
}

.date-number {
  font-weight: bold;
  display: block;
  padding: 4px 0 0 4px;
}

.event {
  margin: 3px 0;
  padding: 5px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  display: inline-block;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

  .event[title]:hover::after {
    content: attr(title);
    position: absolute;
    background: #333;
    color: #fff;
    font-size: 0.75em;
    padding: 4px 8px;
    border-radius: 4px;
    top: 100%;
    left: 0;
    white-space: nowrap;
    margin-top: 5px;
  }

.sperrmuell {
  background-color: var(--color-sperrmuell-bg);
}

.papier {
  background-color: var(--color-papier-bg);
}

.elektro {
  background-color: var(--color-elektro-bg);
}

.gruen {
  background-color: var(--color-gruen-bg);
}

.empty {
  background-color: transparent;
  border: none;
}

.event-list {
  max-width: 800px;
  background: var(--bg-container);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px var(--shadow-color);
}

  .event-list .noresult {
    text-align: center;
    width: 100%;
    display: block;
    padding: 50px;
    background: var(--warning-background);
  }

.event-card {
  border-style: solid;
  border-width: 1px 1px 1px 10px;
  padding: 10px 10px;
  margin-bottom: 10px;
  border-radius: 6px;
  background-color: var(--info-background);
  background-color: var(--bg-body);
  box-shadow: 0 1px 3px var(--shadow-color);
  display: block;
  transition: transform .2s;
}

  .event-card:hover,
  .event-card:focus,
  .event-card:focus-within {
    transform: scale(1.02);
    background-color: var(--info-background) !important;
  }

/* NAVBAR GRUNDSTIL */
.navbar {
  z-index: 100;
  height: 60px;
  position: sticky;
  top: 0;
  background-color: var(--bg-container);
  border-bottom: 1px solid var(--border-color);
  box-shadow: 0 2px 5px var(--shadow-color);
}

.nav-container {
  max-width: 1000px;
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.logo {
  height: 100%;
  padding: 2px 10px;
}

  .logo img {
    display: block;
    height: 100%;
  }

/* NAV-LINKS */
.nav-links {
  display: flex;
  list-style: none;
  gap: 15px;
}

  .nav-links li a {
    padding: 10px 16px;
    background-color: var(--primary-color);
    border-radius: 8px;
    border-left: 8px solid transparent;
    text-decoration: none;
    color: white;
  }

    .nav-links li a:hover,
    .nav-links li a:focus,
    .nav-links .active {
      border-left: 8px solid var(--primary-color);
      background-color: var(--info-foreground);
    }

/* HAMBURGER ICON */
.menu-icon {
  display: none;
  font-size: 2em;
  cursor: pointer;
  padding-right: 10px;
  user-select: none;
}

/* CHECKBOX HIDDEN */
.menu-toggle {
  display: none;
}

.footer {
  align-self: flex-end;
  width: 100%;
  background-color: var(--bg-container);
  border-top: 1px solid var(--border-color);
  margin-top: 20px;
  padding: 20px 0;
  font-size: 0.9em;
  color: #333;
  box-shadow: 0 -2px 6px var(--shadow-color);
}

.footer-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 10px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-left, .footer-right {
  min-width: 200px;
}

.footer p {
  margin: 2px;
}

.footer a {
  color: #0857ac;
  text-decoration: none;
  font-weight: bold;
}

  .footer a:hover {
    text-decoration: underline;
  }

@media (max-width: 768px) {
  body {
    padding: 0;
    font-size: 1em;
  }

  .weekend {
    /*display: none;*/
  }

  .grid {
    gap: 1px;
    grid-template-columns: repeat(7, minmax(40px, 1fr));
  }

  .day {
    max-width: 100%;
    min-height: 80px;
  }

  .event {
    margin: 0;
  }

  .calendar,
  .event-list {
    margin: 0;
    padding: 15px;
    box-shadow: none;
    border-radius: 4px;
  }

  .content {
    padding: 0;
  }

  .form-container {
    border-radius: 0;
    max-width: none;
  }

  .navbar, .footer {
    margin: 0;
    padding: 0;
  }

  .menu-icon {
    display: block;
  }

  .nav-backdrop {
    position: absolute;
    background: #000000;
    height: 100vh;
    height: calc(100vh - 75px);
    top: 60px;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: -1;
    opacity: 0.5;
  }

  .nav-links {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: end;
    gap: 0;
    margin: 0;
    padding: 10px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-container);
    box-shadow: 0 0 10px var(--shadow-color);
  }

  .menu-toggle:checked + .menu-icon + .nav-links {
    display: flex;
  }

  .nav-links li {
    width: 100%;
    max-width: 250px;
  }

    .nav-links li a {
      display: block;
      margin: 4px 0;
      width: 100%;
    }
}
