@use 'sass:math';
@use "src/styles/framework" as *;

.city-autocomplete-popup {
  position: absolute;
  width: 630px;
  background: #ffffff;
  border-radius: $border-radius;
  opacity: 1;
  @include control-border-shadow();
  z-index: 10000;
  margin-top: $space-s;

  .tabs {
    display: flex;
    align-items: stretch;

    .tab-button {
      height: auto;
      flex-grow: 1;
      border-radius: 0;
      background-color: $blue-extra-light;
      border: none;
      border-right: 1px solid $border;
      border-bottom: 1px solid $border;

      &:hover {
        background-color: $blue-extra-light;
        border-right: 1px solid $border;
        border-bottom: 1px solid $border;

        .p-button-label {
          color: $text-color;
        }
      }

      &.active {
        background-color: $white;
        border-bottom: 1px solid $white;

        .p-button-label {
          color: $text-color;
        }
      }

      &:first-child {
        border-radius: $border-radius 0 0 0;
      }

      &:last-child {
        border-radius: 0 $border-radius 0 0;
        border-right: none;
      }

      .p-button-label {
        color: $blue;
        font-weight: $font-bold;
        font-size: 14px;
        padding: 10px !important;
      }
    }
  }

  .city-autocomplete-popup-footer {
    width: 100%;
    background: #f3f9ff;

    .gps-contaner {
      width: 100%;
      padding: $space-xl;
      border-top: 1px solid $border;

      .gps-button {
        height: $standard-button-height;
        width: 100%;
        background-color: $blue-light;

        .p-button-label {
          font-size: $font-size-m;
        }
      }

      .gps-label-help {
        margin-top: $space-l;
        @include font-small($gray);
      }
    }
  }

  .cell {
    &.contry {
      align-self: flex-start;
      color: $text-color;
      font-weight: $font-bold;
      padding: 7.5px $space-m 7.5px 7.5px;
      width: 30%;
    }

    &.city {
      flex: 1;
      padding-right: $space-m;
      @include font-overflow();

      .city--item {
        width: auto;
        max-width: 100%;
        cursor: pointer;
        @include font-overflow();
        display: inline-block;
        border-radius: $border-radius;
        padding: math.div($space-l, 2) math.div($space-l, 2);
        transition-duration: 0.1s;

        &:hover {
          background-color: $blue-extra-light;
        }
      }

      .airports-column {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: $space-m;

        .city--item {
          color: $light-gray;
          margin-right: $space-m;
        }
      }

      &:last-child {
        padding-right: 0;
      }
    }
  }
}
