@charset "UTF-8";

.accordion, .richtext .accordion {
  //margin: calc(2% + 20px) 0 calc(3% + 20px);

  > ul {
    border-bottom: 1px solid $color-primary-light-03;
    border-bottom: 1px solid var(--theme-color-primary-dimmed-03, $color-primary-light-03);
  }

  > .linklist {
    @media(max-width: 767px) {
      margin: 20px -20px;
    }

    > li {
      border-top: 1px solid $color-primary-light-03;
      border-top: 1px solid var(--theme-color-primary-dimmed-03, $color-primary-light-03);
      margin: 0;
      padding: 0;

      &:before, &:after {
        display: none;
      }

      &.open .accordion-toggler {
        @extend .icon-minus;
        background-color: $color-secondary-light;
        background-color: var(--theme-color-secondary-dimmed, $color-secondary-light);
      }
    }
  }

  &[data-type="contacts"] {
    border-top: 1px solid $color-primary-light-03;
    border-top: 1px solid var(--theme-color-primary-dimmed-03, $color-primary-light-03);

    > li {
      margin: 0;
      padding: 0;
      border-bottom: 1px solid $color-primary-light-03;
      border-bottom: 1px solid var(--theme-color-primary-dimmed-03, $color-primary-light-03);

      &.open {
        background-color: $color-primary-light-04;
        background-color: var(--theme-color-primary-dimmed-04, $color-primary-light-04);

        .accordion-toggler {
          @extend .icon-minus;
        }
      }

      &:before, &:after {
        display: none;
      }
    }

    .accordion-toggler:hover {
      color: $color-secondary-dark;
      color: var(--theme-color-secondary-intensed, $color-secondary-dark);
    }

    .accordion-content {
      margin: 0;
      padding: 0;

      > *:last-child {
        margin: 0;
        padding: 0;
      }
    }

    .contact-wrapper {
      border: 0;
      padding-top: 0;
      padding: 10px 0 20px;
      display: flex;

      > div {
        padding: 8px 20px;

        @media(min-width: 568px) {
          &.image-box {
            min-width: 50%;
            max-width: 50%;
            padding-left: 60px;
          }

          &.text-box:first-child {
            padding-left: 60px;
          }
        }
      }
    }
  }

  &[data-type="event"] {
    > ul {
      padding: 0;
      list-style: none;
      border-bottom: 0;

      > li {
        transition: 0.3s ease;
        margin-bottom: 6px;
        padding: 0;

        &:after {
          display: none;
        }

        &.open {
          background-color: $color-secondary-light;
          background-color: var(--theme-color-secondary-dimmed, $color-secondary-light);

          .accordion-toggler {
            border-bottom-color: $color-primary-light-02;
            border-bottom-color: var(--theme-color-primary-dimmed-02, $color-primary-light-02);
            @extend .icon-minus;
          }
        }
      }
    }

    .ev-title {
      font-weight: 600;
      margin-top: 2px;
    }

    .accordion-toggler {
      border: 1px solid $color-primary-light-03;
      border: 1px solid var(--theme-color-primary-dimmed-03, $color-primary-light-03);
      border-left: 0;
      border-right: 0;
      text-decoration: none;
      padding-right: 15px;

      &:after {
        content: "";
        position: absolute;
        display: block;
        left: 0;
        top: -1px;
        bottom: -1px;
        width: 45px;
        background-color: $color-primary;
        background-color: var(--theme-color-primary, $color-primary);
      }

      &:before {
        z-index: 1;
        color: $color-white;
        left: 0;
        width: 45px;
        text-align: center;
      }

      .date-box {
        display: none;
      }

      .date-wrapper {
        > div {
          display: inline-block;
          font-size: 18px;

          @media(max-width: 767px) {
            font-size: 16px;
          }

          &.date {
            font-size: 28px;
            margin-right: 5px;
            font-family: "Korb";

            @media(max-width: 767px) {
              font-size: 22px;
            }
          }
        }
      }
    }

    .accordion-content {
      padding: 0;
    }

    .event-details {
      display: flex;
      padding: 20px 0;
      margin: 0 10px;

      .event-locationlink > a {
        font-size: 18px;
      }

      @media(max-width: 567px) {
        flex-direction: column;
      }

      + .event-details {
        border-top: 1px solid $color-primary-light-02;
        border-top: 1px solid var(--theme-color-primary-dimmed-02, $color-primary-light-02);
      }

      &.sign-up {
        align-items: center;
        padding: 30px 0;

        @media (max-width: 767px) {
          padding: 20px 0;
        }

        .event-label, .event-content {
          width: 100%;

          @media (min-width: 568px) {
            flex: 1 1 50%;
            max-width: 50%;
          }
        }

        p, .text {
          margin: 0;
        }

        .event-label {
          @media (max-width: 567px) {
            padding-bottom: 15px;
          }
          @media (max-width: 767px) {
            &:before {
              margin-top: 1px;
            }
          }
        }

        .event-content {
          @media (min-width: 568px) {
            text-align: right;

            .btn {
              margin-right: 10px;
            }
          }
        }
      }

      .event-label {
        position: relative;
        padding-left: 50px;
        padding-right: 20px;
        flex: 1 1 100%;

        @media (max-width: 767px) {
          padding-left: 35px;
        }

        @media (min-width: 568px) {
          flex: 1 1 40%;
          max-width: 40%;
        }

        &:before {
          font-family: "Icons";
          font-size: 30px;
          line-height: 1;
          position: absolute;
          left: 7px;

          @media (max-width: 767px) {
            font-size: 24px;
            left: 4px;
            margin-top: -2px;
          }
        }

        &.icon-freie-plaetze:before {
          color: #2E8533;
        }
        &.icon-geschlossen:before {
          color: #EA515A;
        }
        &.icon-liste-1:before {
          left: 9px;
          margin-top: -1px;
        }

        h4 {
          font-size: 22px;
          font-weight: 700;
          margin: 0.1em 0;

          @media(max-width: 1199px) {
            font-size: 20px;
          }

          @media (max-width: 767px) {
            font-size: 18px;
            margin: 0 0 1em;
          }
        }
      }

      .event-content {
        padding-right: 20px;
        font-size: 18px;
        flex: 1 1 100%;
        padding-left: 10px;

        @media (min-width: 568px) {
          flex: 1 1 60%;
          max-width: 60%;
          padding-left: 0;
        }

        @media(max-width: 767px) {
          font-size: 16px;
        }

        > p:last-child, > .text:last-child {
          margin-bottom: 2px;
        }
      }

      .price .amount {
        font-family: "Korb", sans-serif;
        @extend h2;
        line-height: 1.2;
        margin: 0;
      }
    }

    .referees {
      position: relative;
      display: block;
      padding: 0;
      list-style: none;

      &.multiple-events{
        > li {
          margin-bottom: 20px;
        }
        .referees {
          list-style: disc;
          padding-left: 20px;
          margin-top: 10px;
        }
      }
      .image-box {
        margin: 20px 0;

        img {
          max-width: 100%;
          max-height: 300px;
        }
      }

      > li > a {
        font-weight: 600;
      }

      .referee-edatils {
        display: none;

        &:first-child:last-child {
          display: block;
        }
      }
    }
  }

  .accordion-toggler {
    position: relative;
    display: flex;
    width: 100%;
    margin: 0;
    padding: 14px 0 14px 60px;
    align-items: center;
    min-height: 79px;
    font-weight: 400;
    font-size: 22px;
    line-height: 1.3;
    @extend .icon-plus;
    cursor: pointer;
    border: 0;
    background-color: transparent;
    text-align: left;
    text-decoration: underline;
    @include focusvisible;
    transition: 0.25s ease;

    @media(max-width: 767px) {
      font-size: 18px;
      min-height: 60px;
      padding: 12px 20px 12px 52px;
    }

    &.focus-visible:focus {
      z-index: 1;
    }
    &:focus-visible, &.-moz-focusring {
      z-index: 1;
    }

    &:hover {
      background-color: $color-secondary-light;
      background-color: var(--theme-color-secondary-dimmed, $color-secondary-light);
    }

    &:before {
      position: absolute;
      left: 12px;
      font-size: 30px;
      line-height: 1;
      top: 50%;
      margin-top: -15px;
      font-family: "Icons";

      @media(max-width: 767px) {
        left: 16px;
        font-size: 24px;
        margin-top: -12px;
      }
    }
  }

  .accordion-content {
    display: none;
    padding: 20px 0 30px;

    @media(max-width: 767px) {
      padding: 15px 20px 20px;
    }

    > *:last-child {
      margin-bottom: 4px;
    }

    h4 {
      margin-top: 1em;
    }
  }
}

.a-z-content-wrapper {
  .accordion[data-type="contacts"], .accordion {
    border-top: 0;
    margin-top: 2px;
  }

  .accordion {
    > .linklist {
      margin-top: 0;

      > li:first-child {
        border-top: 0;
      }
    }
  }
}
