@import "~bootstrap-sass/assets/stylesheets/bootstrap/_variables.scss";
@import "../../../assets/css/vars.scss";

@import "~font-awesome/scss/_variables.scss";
@import "~font-awesome/scss/_mixins.scss";
@import "~font-awesome/scss/_animated.scss";

.delivery__form__task {

  position: relative;
  margin-bottom: 3em;

  @media (max-width: $screen-sm-max) {
    padding-top: 24px;
  }
  &:before {
    @include fa-icon();
    font-size: 24px;
    display: block;
    position: absolute;
    top: 0;
    color: #9980FA;
    line-height: $line-height-base;
    padding-left: 15px;
    @media (max-width: $screen-sm-max) {
      right: 0;
    }
  }
  .form-group:first-of-type {
    > label {
      font-size: $font-size-large;
    }
  }

  .address-autosuggest__container {
    margin: 0;
  }
}

.delivery__form__task--pickup {
  &:before {
    content: $fa-var-cube;
  }
}

.delivery__form__task--dropoff {
  $top-padding: 30px;
  &:before {
    content: $fa-var-arrow-down;
    top: $top-padding;
  }
  border-top: 1px solid #ededed;
  padding-top: $top-padding;
}

.map-distance-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  z-index: 401;
  padding: 5px;
  background-color: #0984e3;
  color: #ffffff;
}

.delivery-price {

  border: 4px solid #0984e3;

  display: flex;
  justify-content: space-between;
  align-items: center;

  & > div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;

  }

  &-label {
    position: relative;
    font-size: $font-size-large;
    font-weight: 700;
    background-color: #0984e3;
    padding: 20px;
    color: #ffffff;
  }

  &-value {
    font-family: "Roboto Mono", monospace;
    padding-right: 20px;
    > span {
      display: block;
    }
  }

  &--error {
    border: 4px solid $alert-danger-border;
    color: $alert-danger-text;
    .delivery-price-label {
        background-color: $alert-danger-bg;
    }
  }

  &--loading {
    .delivery-price-label {
      padding-right: 40px;
    }
    .delivery-price-label:after {
      @include fa-icon();
      content: $fa-var-spinner;
      @extend .fa-pulse;
      display: block;
      position: absolute;
      top: calc(50% - 10px);
      right: $padding-base-horizontal;
    }
  }
}

.delivery__form__buttons {
  display: flex;
  flex-direction: column;
  gap: 1em;
}

.ant-picker + .ant-picker {
  margin-left: 0.5em;
}

.ReactModal__Overlay--optimization-suggestions {
  z-index: 1001; // Needed to show always above Leaflet map
}

.ReactModal__Content--optimization-suggestions {
  @media (min-width: $screen-lg-min) {
    width: 50%;
  }
  @media (min-width: $screen-md-min) and (max-width: $screen-md-max) {
    width: 66%;
  }
  @media (max-width: $screen-xs-max) {
    width: calc(100% - 30px);
  }
}

@import "./packages.scss";
