@import '../../_global/styles/mixins';
@import '../../_global/styles/vars';

.events {
  padding: var(--section-padding) 0;
  background-color: var(--theme-color-primary-dimmed-04);

  .container > h2 {
    margin-top: var(--section-headline-margin);
  }

  + .events {
    margin-top: var(--border-width);
  }

  .events-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    .prev, .next {
      margin-right: 10px;
      transition: 0.13s ease;

      &:hover {
        padding-left: 7px;
      }

      &.disabled {
        opacity: 0.4;
        pointer-events: none;
      }
    }

    .prev {
      transform: rotate(-90deg);
    }
    .next {
      transform: rotate(90deg);
    }

    a:last-child {
      @media(max-width: 767px) {
        margin-left: auto;
      }
    }

    > a:not(.btn) {
      @include focus-visible;

      &:hover {
        color: var(--theme-color-link-hover);
      }
    }
  }

  .mailupdate {
    margin-right: auto;
    display: block;
    @include focus-visible;
    transition: 0.3s ease;
    margin-left: -8px;
    padding: 2px 8px;
    border-radius: var(--border-radius-xs);

    @media(max-width: 767px) {
      margin-bottom: 20px;
      min-width: 100%;
    }
  }
}

/*
.main-col {
  .events {
    padding: 34px 0;
    margin: calc(3% + 20px) 0;

    .container {
      padding: 0 42px;
    }
  }
}
*/

.events-wrapper {
  margin: 25px -10px;
  overflow: hidden;
  transition: 0.4s $easeOutQuad;
  padding: 0 10px;
}

.events-list {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 0;
  transition: 0.4s $easeOutQuad;

  .result + .more-wrapper {
    margin-top: 24px;
  }

  li {
    position: relative;
    display: block;
    padding: 5px 0;
  }

  .event-component {
    margin: 10px 0;
    opacity: 1;
  }

  p {
    margin: 0 4px 2px;
    line-height: 1.2;
    text-decoration: underline;

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

.results-wrapper.events-list {
  .date-wrapper {
    font-size: 18px;
    line-height: 1.3;
  }

  a:not(.btn):hover .ev-title ~ div {
    color: var(--theme-color-primary);
  }

  .ev-title {
    text-decoration: underline;
    font-weight: 600;
    margin: 12px 0 6px;
    font-size: 22px;

    ~ div {
      display: inline-block;
      font-size: 18px;
      line-height: 22px;
      margin-right: 15px;
      margin-bottom: 2px;

      &:last-child {
        margin-bottom: 8px;
      }

      &:before {
        position: relative;
        display: inline-block;
        font-family: "Icons", sans-serif;
        font-size: 16px;
        line-height: 20px;
        margin-right: 5px;
        vertical-align: top;
        top: -1px;
      }

      @media(max-width: 567px) {
        display: block;
        padding-left: 24px;
        position: relative;

        &:before {
          position: absolute;
          left: 0;
        }
      }

      &.date {
        //@extend .icon-xsmall-kalender;
      }
      &.time {
        //@extend .icon-xsmall-uhr;
      }
      &.location {
        //@extend .icon-xsmall-pin;
      }
      &.interested-parties {
        //@extend .icon-xsmall-liste;
      }
      &.price {
        //@extend .icon-xsmall-euro;
      }
      &.status {
        //@extend .icon-xsmall-offen;

        &:before {
          color: #2E8533;
        }

        &.interested-parties, &.waiting-list {
          //@extend .icon-xsmall-liste;

          &:before {
            color: var(--theme-color-primary);
          }
        }

        &.reserved {
          //@extend .icon-xsmall-geschlossen;

          &:before {
            color: #EA515A;
          }
        }
      }
    }
  }
}