@import '../../../../../themes/contrib/bootstrap5/scss/style';

$primary: #CF1730;
$light: #D0CBCB;
$black: #000000;
$gray: #828282;
$white: #ffffff;
$blue: #002444;
$yellow: #fbb629;

$inter: "Inter", sans-serif, Helvetica;
.map-row-wrapper-placeholder {
  margin: 20px auto !important;
  width: 100%;
  height: 400px;
  background-image: url("../images/map_blur.jpg");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.paragraph-map-container {
  margin-top: 100px;

  .place-list-wrapper {
    height: 60vh;
    max-height: 500px;

    &.has-filters {
      height: 440px;
    }

    .place-wrapper {
      display: flex;
      flex-direction: column;
      margin-bottom: 10px;
      border-bottom: 1px dotted $yellow;
      padding-bottom: 10px;
    }

    h2 {
      font-size: 1.2rem;
      color: $blue;
    }

    a {
      justify-content: center;
      color: $blue;
      background-color: $yellow;
      font-size: 0.8rem;
      padding: 10px 15px;
      text-align: center;
      @include border-radius(4px);
      text-transform: uppercase;
      margin: 0 auto;
      display: inline-block;
      text-decoration: none;
      border: 2px solid transparent;
      transition: color 0.3s, background-color 0.3s;

      &:hover {
        color: $blue;
        border-color: $blue;
        background-color: transparent;
        transition: color 0.3s, background-color 0.3s;
      }
    }

    p {
      font-size: 1rem;
      line-height: 1;

    }
  }

  .buttons {
    display: flex;
  }

  .map-header {
    font-family: $inter;
    margin-top: 40px !important;

    h2, h3 {
      font-size: 0.9375rem;
      text-align: center;
      font-weight: bold;
      text-transform: uppercase;
      margin-bottom: 0;
      line-height: 27px;
    }

    h2 {
      color: $blue;
    }

    ol {
      display: flex;
      flex-direction: row;
      text-align: center;
      gap: 10px;
      justify-content: center;
      padding: 0;
      margin-top: -10px;

      li {
        display: flex;
        flex: 1;
        flex-direction: column;
        justify-content: center;
        font-weight: bold;
        font-size: 0.75rem;
        line-height: 17px;
        text-align: center;
        position: relative;
        padding-top: 60px;

        span {
          display: inline-block;
          color: $blue;
          text-transform: uppercase;
          font-size: 1.0625rem;
        }

        &::before {
          content: " ";
          display: block;
          position: absolute;
          top: 20px;
          width: 100%;
          height: 30px;
          background-size: contain;
          background-repeat: no-repeat;
          background-position: center center;
        }

        &::after {
          display: block;
          content: " ";
          width: 30px;
          height: 30px;
          text-align: center;
          font-size: 0.8125rem;
          position: absolute;
          right: -20px;
          top: 30px;
          background-image: url('../images/icons/arrow.svg');
          background-repeat: no-repeat;
        }

        &:last-of-type {
          &::after {
            display: none;
          }
        }

        &:first-of-type {
          &::before {
            background-image: url('../images/icons/map1.svg')
          }
        }

        &:nth-child(2) {
          &::before {
            background-image: url('../images/icons/sign_right.svg')
          }
        }

        &:nth-child(3) {
          &::before {
            background-image: url('../images/icons/phone.svg')
          }
        }

        &:nth-child(4) {
          &::before {
            background-image: url('../images/icons/ticket_beer.svg')
          }
        }
      }
    }
  }

  .current-flow-d {
    .map-header {
      li {
        &:nth-child(2) {
          &::before {
            background-image: url('../images/icons/treat.svg')
          }
        }

        &:nth-child(3) {
          &::before {
            background-image: url('../images/icons/find out.svg')
          }
        }
      }
    }
  }

  .list-column {
    max-height: 700px;
  }

  .map-container {
    height: 70vh;
    width: 100%;
    background: url('../images/map_placeholder.jpg') center center no-repeat;
    background-size: cover;
    position: relative;

    .map {
      height: 100%;
    }

    strong {
      font-weight: bold;
    }
    #switch-button {
      position: absolute;
      right: 20px;
      bottom: 20px;
      background-color: $red;
      border: 1px solid $red;
      .label {
        display: flex;
        gap: 10px;
        color: #fff;


        &:before {
          content: "";
          width: 20px;
          height: 20px;
          display: block;
          background: url("../images/icons/ion_list-sharp.svg");
        }
      }
    }
  }

  .controller-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;

    .event-container {
      background: $primary;
      text-align: center;
      height: 100%;
      width: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      border-left: 2px solid transparent;
      border-top: 2px solid transparent;
      border-bottom: 2px solid transparent;

      .event {
        cursor: pointer;
      }

      &.active {
        background: $white;
        color: $primary;
        border-left: 2px solid $primary;
        border-top: 2px solid $primary;
        border-bottom: 2px solid $primary;
      }
    }
  }

  #loading {
    width: 48px;
    height: 48px;
    display: inline-block;
    position: relative;


    &::after,
    &::before {
      content: '';
      box-sizing: border-box;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      border: 2px solid $white;
      position: absolute;
      left: 0;
      top: 0;
      animation: animloader 2s linear infinite;
    }

    &::after {
      animation-delay: 1s;
    }

    @keyframes animloader {
      0% {
        transform: scale(0);
        opacity: 1;
      }
      100% {
        transform: scale(1);
        opacity: 0;
      }
    }
  }

  #map-info-panel {
    display: none;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 20vh;
    background-color: $primary;
    color: $white;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 3;

    .close {
      position: absolute;
      right: 10px;
      top: 10px;
      cursor: pointer;
    }

    h2 {
      text-align: center;
      margin-top: 10px;
    }

    .message {
      background-color: $white;
      border-radius: 2px;
      border: 1px solid darkgrey;
      padding: 10px;

      a, p {
        color: grey;
        margin: 0;
      }
    }

    .open-on-google {
      text-align: center;
      text-transform: uppercase;
      color: $primary;
      background: white;
      display: block;
      margin: 0 auto 10px;
      padding: 6px 0;
      width: 100%;
      text-decoration: none;
      font-size: 20px;
    }
  }

  .share-container {
    text-align: center;

    .share-offer-link {
      z-index: 2;
      padding: 10px 20px;
      font-family: $inter;
      font-weight: bold;
      text-transform: uppercase;
      margin-top: -120px;
      position: relative;
    }

    h2 {
      font-size: 1.125rem;
      font-family: $inter;
      text-align: center;
      color: $primary;
      margin-bottom: 20px;
      font-weight: bold;
    }

    p {
      font-family: $inter;
      font-size: 0.875rem;
      margin-bottom: 15px;
      font-weight: bold;
      text-align: left;
    }

    .input-group {

      .input-group-text {
        background-color: transparent;
        border-right: none;
        padding-top: 10px;
        padding-bottom: 10px;
        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;

        .icon {
          background-image: url('../images/icons/anchor.svg');
          background-size: 100% 100%;
          background-repeat: no-repeat;
          width: 20px;
          height: 20px;
        }
      }

      input {
        padding-top: 10px;
        padding-bottom: 10px;
        border-left: none;
        color: $gray;
      }

      button {
        padding-top: 10px;
        padding-bottom: 10px;
        background: $primary;
        color: $white;
        font-family: $inter;
        font-weight: bold;
        display: flex;
        gap: 10px;
        border-color: $primary;
        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;

        .icon {
          background-image: url("../images/icons/copy.svg");
          width: 20px;
          height: 20px;
          display: block;
          background-size: 100% 100%;
        }

        &.copied {
          background: $white;
          border: 2px solid $primary;
          color: $primary;

          .icon {
            background-image: url("../images/icons/copied.svg");
          }
        }
      }
    }

    #share-button {
      text-align: center;
      background: $primary;
      color: $white;
      width: 100%;
      display: block;
      text-transform: uppercase;
      font-weight: bold;
      font-family: $inter;
      font-size: 1rem;
    }

    .btn-close {
      position: absolute;
      right: 10px;
      top: 10px;
      z-index: 2;
    }
  }

  .gm-style-iw-a {
    .gm-style-iw-c {
      max-width: 350px !important;
      border-radius: 5px;
      padding: 20px;
      max-height: fit-content !important;

      .gm-style-iw-d {
        height: 100% !important;
        max-height: 100% !important;
        display: flex;
        flex-direction: column;

        div {
          text-align: center;
        }
      }

      h2 {
        color: $blue;
        font-family: $inter;
        font-size: 1rem;
        text-align: center;
        margin-bottom: 20px;
        font-weight: bold;
        display: flex;
        flex-direction: column;
        justify-content: center;

        .icon {
          width: 25px;
          height: 25px;
          display: block;
          border: 3px solid $primary;
          color: $primary;
          font-weight: bold;
          border-radius: 50%;
          padding: 7px;
          line-height: 3px;
          margin: 0 auto 10px;
        }
      }
    }

    .text {
      font-family: $inter;
      font-size: 0.875rem;
      line-height: 1rem;
      text-align: center;
    }

    .tags {
      font-family: $inter;
      font-size: 0.875rem;
      font-weight: bold;
      line-height: 1rem;
      text-align: center;
    }

    .image {
      text-align: center;
      margin-top: 10px;

      img {
        margin: 0 auto;
        width: 90px;
      }
    }

    .working_hours,
    .address {
      display: flex;
      font-family: $inter;
      font-size: 0.9rem;
      color: $black;

      .icon {
        background-image: url('../images/icons/location_logo.svg');
        display: block;
        background-size: contain;
        width: 20px;
        height: 20px;
        background-repeat: no-repeat;
        background-position: center center;
        margin-right: 10px;
      }
    }

    .working_hours {
      color: $primary;

      span:not(.icon) {
        color: $black;
        margin-left: 7px;
      }

      .icon {
        background-image: url('../images/icons/open_hours_logo.svg');
      }

    }

    a {
      justify-content: center;
      font-weight: bold;
      color: $blue;
      background-color: $yellow;
      font-size: 0.8rem;
      padding: 10px 15px;
      text-align: center;
      @include border-radius(4px);
      text-transform: uppercase;
      margin: 0 auto;
      display: inline-block;
      text-decoration: none;
      border: 2px solid transparent;
      transition: color 0.3s, background-color 0.3s;

      &:hover {
        color: $blue;
        border-color: $blue;
        background-color: transparent;
        transition: color 0.3s, background-color 0.3s;
      }
    }

    button.gm-ui-hover-effect {
      top: 5px !important;
      right: 5px !important;

      span {
        background-image: url('../images/icons/close.svg');
      }
    }
  }

  .clear-search {
    cursor: pointer;
  }
}

@include media-breakpoint-down(lg) {
  .paragraph-map-container {
    .map-row {
      background-color: $blue;
    }

    .map-column {
      .map-container {
        .map {
          height: 100%;
        }
      }
    }

    .list-column {
      padding: 0;

      .place-list-wrapper {
        .place-wrapper {
          padding: 20px 15px !important;
        }
      }
    }
  }
}
