.mealz-store-locator {
  height: 100%;
  display: flex;

  .mealz-store-locator__pos-selection {
    display: flex;
    width: 320px;
    padding: 40px var(--spacing-padding-16-px, 16px);
    flex-direction: column;
    align-items: stretch;
    gap: var(--spacing-padding-16-px, 16px);
    flex-shrink: 0;
    background: var(--mealz-ds-color-neutral-white, #ffffff);
    box-shadow: 2px 0px 16px 0px rgba(0, 0, 0, 0.15);
    z-index: 1;

    .mealz-store-locator__title {
      color: var(--mealz-ds-color-neutral-black, #0f191f);
      font-size: 28px;
      font-weight: 700;
      line-height: 120%;
    }

    .mealz-store-locator__go-back-button {
      border-radius: 100%;
      height: 40px;
      width: 40px;
      display: flex;
      justify-content: center;
      align-items: center;

      img {
        width: 15px;
        height: 15px;
      }
    }

    #mealz-store-locator__store-locator-form {
      display: flex;
      flex-direction: column;
      gap: 8px;

      .mealz-store-locator__address-input-container {
        display: flex;
        gap: 8px;
        height: 40px;
        position: relative;

        .mealz-store-locator__locate-button {
          position: absolute;
          background: unset;
          border: unset;
          padding: 0;
          top: 8px;
          left: 8px;
          width: 24px;
          height: 24px;

          .mealz-store-locator__geolocation-icon {
            cursor: pointer;
            width: 24px;
            height: 24px;
          }
        }

        .mealz-store-locator__locate-button
          + .mealz-store-locator__address-input {
          padding-left: 40px;
        }

        .mealz-store-locator__address-input {
          padding-left: 8px;
          flex: 1;
          border: 1px solid var(--mealz-ds-color-neutral-200, #D9DDE1);
          border-radius: 4px;
          font-size: 14px;
        }
      }

      .mealz-store-locator__select-supplier {
        display: flex;

        .mealz-store-locator__select-supplier-select {
          flex: 1;
          padding: 10px;
          max-width: initial;
        }
      }
    }

    .mealz-store-locator__pos-loader {
      flex: 1;
      width: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .mealz-store-locator__pos-loader .mealz-ds-loader {
      margin: 16px;
      display: flex;
      width: 72px;
      height: 72px;
      background-position-x: 36px;
      background-size: 36px 36px;
    }

    #mealz-store-locator__pos-list {
      flex-direction: column;
      align-items: flex-start;
      gap: var(--spacing-padding-12-px, 12px);
      align-self: stretch;
      overflow: auto;
    }

    .mealz-store-locator__pos-list__visible,
    .mealz-store-locator__pos-list__hidden {
      display: flex;
    }

    .mealz-store-locator__no-pos-found {
      margin-bottom: 16px;
      width: 100%;
      flex: 1;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-direction: column;
    }
  }

  #mealz-store-locator__view-swapper-button {
    display: none;
  }

  .mealz-store-locator__pos-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    align-items: flex-start;
    gap: 16px;
    align-self: stretch;
    border-radius: 8px;
    border: 1px solid var(--mealz-ds-color-neutral-200, #eff1f3);

    .mealz-store-locator__pos-data {
      display: flex;
      align-items: flex-start;
      gap: 8px;
      align-self: stretch;

      .mealz-store-locator__pos-picture {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
      }

      .mealz-store-locator__pos-name {
        color: var(--mealz-ds-color-neutral-black, #0f191f);
        font-size: 14px;
        font-weight: 700;
        line-height: 150%;
      }

      .mealz-store-locator__pos-address {
        color: var(--mealz-ds-color-neutral-500, #8c96a2);
        font-size: 12px;
        font-weight: 600;
        line-height: 150%;
      }
    }

    .mealz-store-locator__pos-cta {
      display: flex;
      justify-content: flex-end;
      width: 100%;

      .mealz-select-pos-button {
        border-radius: 1000px;
      }
    }
  }

  #mealz-store-locator__map {
    z-index: 0;
    flex: 1 1 0;
    min-height: 400px;
    width: 100%;

    .mealz-store-locator__pos-item {
      border: none;
      padding: 0;
    }

    .leaflet-marker-pane .mealz-marker-icon {
      border-radius: 50%;
      overflow: hidden;
      object-fit: cover;
      border: 4px solid var(--mealz-ds-color-neutral-white, #FFFFFF);
      box-sizing: content-box;
    }
  }
}

@media (max-width: 768px) {
  .mealz-store-locator {
    position: absolute;
    flex-direction: column;
    inset: 0;

    .mealz-store-locator__pos-selection {
      width: 100%;
      padding: 0;
      gap: 0;

      .mealz-store-locator__go-back-button {
        position: absolute;
        z-index: 1;
        top: 12px;
        left: 8px;
        width: 32px;
        height: 32px;
      }

      .mealz-store-locator__title {
        position: relative;
        min-height: 56px;
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-bottom: solid 1px var(--mealz-ds-color-neutral-200, #eff1f3);
      }

      #mealz-store-locator__store-locator-form {
        padding: 24px 16px;

        .mealz-store-locator__address-input-container {
          .mealz-store-locator__address-input {
            width: calc(100% - 44px);
          }

          .mealz-store-locator__search-address-button {
            width: 36px;
          }
        }
      }

      #mealz-store-locator__pos-list {
        padding: 0 16px 12px;
        align-items: center;

        &.mealz-store-locator__pos-list__visible {
          display: flex;
        }

        &.mealz-store-locator__pos-list__hidden {
          display: none;
        }
      }

      .mealz-store-locator__pos-loader {
        position: absolute;
        height: 100%;
      }

      &.mealz-store-locator__pos-selection__height {
        height: 100%;
      }
    }

    #mealz-store-locator__view-swapper-button {
      width: 100%;
      display: flex;
      justify-content: center;
      padding: 12px 0;

      &.mealz-store-locator__see-list-button {
        z-index: 1;
        bottom: 40px;
        position: absolute;
      }

      &.mealz-store-locator__see-map-button {
        box-shadow: -2px 0 18px 0 rgba(0, 0, 0, 0.15);
        margin-top: auto;
      }
    }
  }
}
