/*
 * VGS Bus Search — Estilos
 */

/*Ordenamos el form*/
.vgs-field--origin {
  order: 1;
}

.vgs-field--destination {
  order: 2;
}

.vgs-field--trip-type {
  order: 3;
}

.vgs-container-dates {
  order: 4;
}

.vgs-field--passengers {
  order: 5;

  @media (max-width: 1024px) {
    order: 2;
  }

  @media (max-width: 480px) {
    width: 100% !important;
  }
}

.vgs-button--search {
  order: 6;
}

/*Estilos para el form*/
.vgs-form {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 15px 12px;

  @media (max-width: 1350px) {
    margin: 0 20px;
  }

  @media (max-width: 1024px) {
    flex-wrap: wrap;
    margin: 0 50px;
    padding: 15px 25px;
  }

  @media (max-width: 480px) {
    margin: 0;
    padding: 15px;
  }

  * {
    margin: 0 !important;
    padding: 0 !important;
    color: #777777 !important;
  }

  .vgs-field__inner {
    display: flex;
  }

  /*Inputs origen/destino*/

  .vgs-field--origin,
  .vgs-field--destination {
    flex: 1 1 170px;
    min-width: 170px;

    @media (width: 1024px) {
      flex: 1 1 calc(50% - 10px) !important;
      max-width: calc(50% - 10px) !important;
    }
  }

  .vgs-field__input {
    border: 1px solid #dbe4f4 !important;
    border-radius: 5px !important;
    padding: 14px !important;
  }

  .vgs-field--trip-type {
    display: flex !important;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;

    @media (max-width: 480px) {
      justify-content: space-around;
      width: 100%;
    }
  }

  /*Radio btn*/

  .vgs-radio {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: row;
    gap: 8px;
    cursor: pointer;

    .vgs-radio__dot {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #f2f2f2;
      border: 1px solid rgba(66, 80, 102, 0.4);
      box-shadow: 0px 2px 4px rgba(66, 80, 102, 0.1);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .vgs-radio__dot::after {
      content: "";
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #ff5100;
      opacity: 0;
      transition: opacity 0.15s;
    }

    .vgs-radio__input {
      display: none;
    }

    .vgs-radio__input:checked + .vgs-radio__dot {
      background: #ffffff;
      border-color: rgba(66, 80, 102, 0.4);
    }

    .vgs-radio__input:checked + .vgs-radio__dot::after {
      opacity: 1;
    }

    .vgs-radio__label {
      font-size: 14px;
      color: #777777;
      user-select: none;
      min-width: max-content;
    }
  }

  /*Fechas*/

  .vgs-field--hidden {
    display: none;
  }

  .vgs-container-dates {
    display: flex;
    gap: 15px;

    @media (max-width: 480px) {
      flex: 1 1 100%;
    }

    .vgs-field--departure-date,
    .vgs-field--return-date {
      flex: 1 1 0;
      min-width: 146px;

      #vgs-departure-date,
      #vgs-return-date {
        width: 100%;
      }
    }

    .vgs-field__input--date {
      background-image: url("/wp-content/uploads/2026/03/Vector.svg");
      background-repeat: no-repeat;
      background-position: right 14px center;
      padding-right: 40px;
      width: 146px;
    }

    .vgs-field__input--date::-webkit-calendar-picker-indicator {
      opacity: 0;
      position: absolute;
      right: 0;
      width: 40px;
      height: 100%;
      cursor: pointer;
    }
  }

  /*Cantidad pasajeros*/

  #vgs-passengers {
    width: 180px;

    @media (max-width: 480px) {
      width: 100%;
    }
  }

  .vgs-field__input--select {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    background-color: transparent;
    background-image: url("/wp-content/uploads/2026/03/.svg") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 40px !important;
  }

  /*Boton buscar*/

  .vgs-button--search {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 30px !important;
    height: 50px;
    background: #ff5100;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    gap: 10px;

    @media (max-width: 768px) {
      width: 100%;
    }
  }

  .vgs-button__label {
    font-family: "Inter", sans-serif;
    font-weight: bold;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff !important;
    text-align: center;
  }

  .vgs-button__arrow {
    font-size: 18px;
    color: #ffffff !important;
    line-height: 1;
  }

  .vgs-button--search:hover {
    background: #e04700;
  }

  .vgs-button--search:active {
    transform: scale(0.98);
  }

  .vgs-button__arrow {
    position: relative;
    left: 15px;
    width: 8px;
    height: 14px;
    background-image: url("/wp-content/uploads/2026/03/.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: right;
  }

  /*Popups con origenes/destinos*/

  #vgs-origin-dropdown,
  #vgs-destination-dropdown {
    display: none;
    position: absolute;
    margin-top: 20px !important;
    flex-direction: column;
    /*padding: 20px !important;*/
    border-radius: 5px;
    max-height: 240px;
    overflow: hidden;
    overflow-y: auto;
    flex: 1 1 170px;
    min-width: 170px;

    .vgs-dropdown__item {
      padding: 15px !important;
      border-bottom: 1px solid #dbe4f4;
      background: white;
      list-style: none;
      cursor: pointer;

      &:hover {
        background: #dbe4f4;
      }
    }
  }

  #vgs-origin-dropdown.vgs-dropdown--open,
  #vgs-destination-dropdown.vgs-dropdown--open {
    display: flex;
  }
}

#vgs-error-popup {
  display: none;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 14px;
  text-transform: uppercase;

  #vgs-error-message {
    background: #e1001a;
    padding: 10px 20px;
    border-radius: 12px;
    overflow: hidden;
    color: white;
  }
}
