.date-selection {
  &-hidden {
    display: none;
  }

  &__info-block {
    &-error {
      display: flex;
      align-items: center;
      color: $red;

      .icon {
        margin-right: 15px;
        font-size: 1rem;
      }
    }
  }

  .delivery-date::after {
    border: 0;
  }

  .calendar {
    background: $white;
    border: 0;

    &__head {
      padding: 0 30px;
      margin-bottom: 20px;

      &-wisdom {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
    }

    &__switch {
      font-size: 1rem;
      color: $blue;
      cursor: pointer;
      text-transform: capitalize;

      &-earlier {
        .calendar__switch-icon {
          margin-right: 5px;
        }
      }

      &-latest {
        .calendar__switch-icon {
          margin-left: 5px;
        }
      }
    }

    &__month {
      font-size: 1rem;
      line-height: 1.125rem;
      font-weight: 500;
      color: $blue-ocean;
      text-align: left;
      margin: 0;
    }

    &__row {
      &_names {
        background: $white;
        color: $blue-ocean-dark;
        font-size: .875rem;
        font-weight: 500;
        margin: 0;
      }

      &_days {
        font-size: .8125rem;
        line-height: .8125rem;
        font-weight: 500;
      }

      &_extended {
        padding-top: 25px;
      }
    }

    &__cell {
      &_cnt {
        font-size: .875rem;
        border-radius: 50%;
        height: 34px;
        line-height: 34px;
        z-index: 1;
        position: relative;

        &:hover {
          border-color: transparent;

          &:after {
            content: '';
            position: relative;
            display: block;
            border-radius: 50%;
            width: 34px;
            height: 34px;
            left: calc(50% - 34px / 2);
            top: -34px;
          }
        }
      }


      &_selected,
      &:active {
        position: relative;
        background: transparent;
        color: $white;
        z-index: 1;

        &:after {
          content: '';
          position: relative;
          display: block;
          background: $blue;
          border-radius: 50%;
          width: 34px;
          height: 34px;
          top: -34px;
          left: calc(50% - 34px / 2);
          z-index: -1;
        }
      }
    }

    &__message {
      display: flex;
      justify-content: center;
      flex-direction: column;
      padding: 20px 20px 40px;
      font-weight: 500;
      font-size: 1rem;
    }
  }

  &.date-selection_selected {
    border: 0;

    .delivery-types {
      padding: 0;
      margin: 0;
      background: initial;

      &__inner {
        .btn {
          margin-bottom: 20px;
        }

        .delivery-type__action-btn-primary {
          background-color: $blue;
          border-color: $blue;
          color: $white;
          pointer-events: none;
          cursor: default !important;
        }
      }
    }
  }
}

@include media-breakpoint-up(sm) {
  .date-selection {
    .calendar {
      &__head {
        padding: 0 15px;
      }
    }
  }
}

@include media-breakpoint-up(md) {
  .date-selection {
    .delivery-date,
    .delivery-time {
      height: auto;
      //min-height: 362px;
    }

    .calendar {
      &__message {
        padding: 50px 40px 70px;
      }

      &__head {
        padding: 0 20px;
      }

      &__cell {
        &_cnt {
          &:hover {
            &:after {
              border: 1px solid $blue;
            }
          }
        }
      }
    }
  }
}

@include media-breakpoint-up(xl) {
  .date-selection {
    .calendar {
      &__head {
        padding: 0 25px;
      }
    }
  }
}

@media screen and (max-width: 320px) {
  .date-selection {
    &__info-block {
      &-error {
        align-items: flex-start;
      }
    }
  }
}
