/* buscador */
.wide_searcher .multicriteriasearch {
  margin-top: 0;
  margin-bottom: 0;
  @media (min-width: $grid-float-breakpoint) {
    box-shadow: 2px 2px 2px 0 rgba(0,0,0,.2);
    margin-top: 20px;
  }
}
.wide_searcher.cont_buscador_error .multicriteriasearch {
  margin-top: 0;
}

.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
  width: 100% !important;
}

.bootstrap-select >.dropdown-toggle {
  height: 44px;
  .caret {
    right: 10px;
    margin-top: -5px;
  }
  .filter-option-inner {
    padding-right: 0 !important;
  }
  .filter-option-inner-inner {
    line-height: 24px;
  }
}

.bootstrap-select .dropdown-menu {
  min-width: 100% !important;
}

.bootstrap-select .dropdown-menu li a.doble,
.bootstrap-select .dropdown-menu li a.multiple {
  background-repeat: no-repeat;
  display: block;
  padding: 10px 15px 10px 50px;
  background-position: top 50% left 15px;
  &:focus, &:hover {
    background-color: #f4f8fc;
  }
}

.dropdown-menu > .active > a {
  background-color: #f4f8fc;
  color: $dropdown-link-color;
  &:focus, &:hover {
    color: $dropdown-link-color;
  }
}

.bootstrap-select .dropdown-menu li a.doble {
  background-image: url(/headers/ilusion/sunrise/dist/svg/icon-ownfill-graph-occupancydoble-D03505.svg);
}

.bootstrap-select .dropdown-menu li a.multiple {
  background-image: url(/headers/ilusion/sunrise/dist/svg/icon-ownfill-graph-occupancymultiple-D03505.svg);
}

@media (min-width: $screen-md-min) {
  .wide_searcher {
    .multicriteriasearch {
      .tab-content .tab-pane {
        /*Todos los formularios dentro de pestanas de multicriteria seran flexbox */
        form:not([style*="display:none"]) {
          display: flex !important;
          flex-wrap: wrap;
          align-content: flex-start;
        }
      }
      .tab-content .tab-pane[id^="travel_"], .tab-content .tab-pane[id^="cars_"], .tab-content .tab-pane[id^="experiences_"] {
        form:not([style*="display:none"]) {
          display: block !important;
        }
        .continente_boton_submit, .dates, .occupancy_container {
          display: block;
        }
        .dates {
          margin: 0;
          .date-calendar-in, .date-calendar-out {
            width: 48%;
          }
        }
        #flyplushotel .dates {
          display: flex;
        }
      }
      .tab-content .tab-pane[id^="cars_"] {
        fieldset {
          margin-bottom: 10px !important;
        }
        .dates a.out_date {
          margin: 0;
        }
        .continente_boton_submit button[type=submit] {
          width: auto;
        }
      }
      .tab-pane[id^='hotel_chain'] .destiny div, .tab-pane[id^='hotel_chain'] .destiny input[type='text']{
        margin-top: 0;
      }

      /* Correccion para FF - flexbox en FF no funciona bien con algunos elementos en absolute */
      #advanced_search_criteria_hotelsearchwidget0 {
        position: static;
        width: 0;
        height: 0;
      }
    }
    &.hotelsearchwidget .destiny > .bootstrap-select.btn-group > .btn {
      font-size: $font-size-base;
    }
    .widgets_transport_search_transportflightsearcherwidget, &.cont_buscador_error, .widgets_transport_search_transporttrainsearcherwidget, &.buscadorModificaBusqueda .fondoblanco_ajax {
      form {
        /* Todos los formularios dentro del buscador de cambiar busqueda de dispo de vuelos */
        display: flex;
        flex-wrap: wrap;
      }
    }
    #searcherWidgetContainer &.cont_buscador_error .tab-pane[id^=travel_] form {
      display: block;
    }
    form.widgets_search_hotelsearchwidget {
      /* Todos los formularios dentro del buscador de cambiar busqueda de dispo de hoteles */
      display: flex;
      flex-wrap: wrap;
    }
    .searcher-form.searcher-with-promocode {
      min-height: 160px;
    }
    [dir="rtl"] & .searcher-form.searcher-with-promocode {
      min-height: 160px;
    }
    [lang="fa"] & .searcher-form.searcher-with-promocode {
      min-height: 150px;
    }
    .dst-widget-close + form.widgets_search_hotelsearchwidget {
      margin-top: 30px;
    }
    &.cont_buscador_error .dst-widget-close .icon-anyfill-ui-close {
      margin-bottom: 0;
    }
    .destiny {
      order: -1;
      flex: 1 1 16%;
    }
    .origindestiny {
      flex: 1 1 24%;
      order: -1;
      .bootstrap-select .btn {
        font-size: $font-size-base;
      }
    }
    .multipledestinations_line {
    }
    .checkdates {
      flex: 0 1 auto;
      order: -1;
      min-width: 280px;
    }
    .dates {
      flex-grow: 0;
      margin: 0 10px;
      order: -1;
      display: flex;
      .date-calendar-in, .date-calendar-out {
        width: auto;
        .flatpickr-trigger {
          max-width: 140px;
        }
      }
      .date-calendar-out {
        margin-left: 10px;
      }
      .col-sm-6 .date-calendar-out {
        margin-left: 0;
      }
      &.dates_calendar_switcher {
        .date-calendar-in, .date-calendar-out {
          flex: 1 1 48%;
          .flatpickr-trigger {
            max-width: 100%;
          }
        }
      }
      &.dates_ri .date-calendar-in, &.dates_ri .date-calendar-out {
        width: 38%;
      }
      /* container de selector de fechas con las noches incluidas */
      &.dates_ri .extra_selector {
        padding: 0;
        position: relative;
        clear: none;
        width: auto;
      }
    }
    [lang|='ar'] & .dates .complete_date .nummes {
      font-size: 14px;
    }
    .dates .datetime {
      .flatpickr-trigger {
        max-width: 100%;
      }
    }
    fieldset {
      margin-bottom: 0;
      &.journeyselector {
        margin-bottom: 18px;
        .btn-group-sm > .btn {
          padding: 5px 14px;
        }
      }
      &.rooms {
        margin-top: 26px;
        margin-right: 15px;
      }
      &.number_people {
        float: none;
        display: inline-block;
        clear: both;
        vertical-align: top;
        margin-top: 0;
        padding: 0 10px 0 0;
        .children_age{
          position: relative;
          padding-left: 10px;
          &:before {
            content:'→';
            position: absolute;
            left: -10px;
            top: 50%;
            color: #fff;
          }
          [dir="rtl"] &:before {
            content:'←';
          }
          .popover {
            min-width: 276px;
          }
        }
        .adults_children .form-group,
        .children_age .form-group {
          float: left;
          margin: 0;
          width:auto;
          margin: 0 15px 10px 0;
        }
        .varias_habitaciones{
          clear:both;
          legend{
            display:block;
          }
        }
      }
    }
    .widget-hotel-search-animation, .widget-transport-search-animation, .widget-transportandhotel-search-animation, .forfait_options, .advanced-options {
      width: 100%;
      order:1;
      margin-top: 0;
    }
    .flightsearch_options, .forfait_options {
      margin-top: 10px;
      width: 100%;
      order:1;
    }
    .hotel_checkdates {
      display: inline-block;
      width:auto;
      order:1;
      margin-bottom: 10px;
      .dates {
        margin: 0;
        order: 0;
      }
      .date-calendar-container {
        a.out_date {
          margin-left: 0;
        }
        &.date-calendar-out {
          margin-left: 9px;
        }
      }
    }
    .forfait_options .checkbox {
      margin-bottom: 0;
    }
    .occupancy_container, .train_occupancy_container {
      display: flex;
      flex-wrap: wrap;
      padding-top: 10px;
    }

    [dir='ltr'] & .datesoccupancy > .occupancy_container, [dir='rtl'] & .datesoccupancy > .occupancy_container, .occupancylayer_container, #flyplushotel .occupancy_container {
      padding-top: 0;
      margin-left: 0;
    }
    .occupancy_container .occupancy-layer-fieldset .searchToggle__btn {
      &, & + .error_text {
        max-width: 245px;
        min-width: 130px;
        @media (max-width: 1100px) {
          max-width: 140px;
        }
      }
      [lang|="ar"] & {
        min-width: 108px;
      }
    }
    .datesoccupancy > .occupancy_container .occupancy-layer-fieldset .searchToggle__btn {
      &, & + .error_text {
        max-width: 245px;
      }
    }
    #flyplushotel .occupancy_container .occupancy-layer-fieldset .searchToggle__btn {
      &, & + .error_text {
        max-width: 100%;
      }
    }
    [dir='ltr'] & .addhotel_label, [dir='rtl'] & .addhotel_label {
      float: none;
      clear: both;
      display: inline-block;
      margin-top: 10px;
    }
    [dir='ltr'] & .addhotel_label.addhotel_hidden, [dir='rtl'] & .addhotel_label.addhotel_hidden {
      display: none;
    }
    .addhotel_layer {
      padding-top: 22px;
      > div {
        display: flex;
        flex-wrap: wrap;
      }
      .addhotel_hide {
        margin-top: 0;
      }
    }
    .addhotel_layer .col-ages{margin-top:-25px}
    .col-people,
    .col-ages {
      width: auto;
      margin-top: 0;
    }
    .col-ages {
      margin:0;
    }
    #addhotel_layer {
      margin-top: 10px;
    }
    .dates a.in_date, .dates a.out_date {
      width: auto;
      min-width: 138px;
    }
    .journeyselector .btn-group {
      text-align: left;
    }
    .continente_boton_submit {
      text-align: right;
      order: 0;
      flex: 0 1 auto;
      button[type=submit] {
        padding: 0 20px !important;
        width: 100%;
        height: 55px;
        font-size: 20px;
        line-height: 1;
      }
    }
    [id^="flights_"] .continente_boton_submit, [id^="flight_and_hotel_"] .continente_boton_submit, [id^="train_"] .continente_boton_submit {
      top: 60px;
    }
    .multidestinos {
      order: -1;
      flex-grow: 1;
      margin-bottom: 10px;
      & .multipledestinations_line {
        margin-right: 15px;
      }
      & .multipledestinations_line .dates a.in_date {
        width: 100%;
      }
      & + .occupancy_container {
        order: 1;
        width: 100%;
      }
      &[style*='display: none'] + .occupancy_container {
        order: 0;
        width: auto;
      }
    }
    .journeyselector {
      width: 100%;
      order: -1;
    }
    &.cont_buscador_error .fondoblanco_ajax {
      position: relative;
    }
    .transport_info_link {
      position: absolute;
      top: 15px;
      right: 15px;
      a {
        position: static;
        top: 0;
      }
    }
    .avanzadashoteles {
      .col-sm-6 {
        width: 33%;
      }
      .col-sm-6 + .col-sm-6 {
        width: 66.6%;
        .checkbox {
          width: 33.3%;
          margin-bottom:2px;
          /* forzar el salto de linea cada 3 elementos */
          &:nth-of-type(5), &:nth-of-type(8), &:nth-of-type(11) {
            clear: left;
          }
        }
      }
    }
    /* selector de esqui */
    [id^="ski_"] .destiny {
      flex: 1 1 20%;
    }
    /* remite interno */
    .remite_container {
      width: 100%;
      order: 2;
    }
    .intent_media {
      width: 100%;
      order: 1;
    }
    .rooms-container {
      order: 1;
      width: 100%;
    }
    .hotels_advanced_search {
      order: 1;
      width: 100%;
      .title_opcionesavanzadas {
        float: none;
        margin-top: 0;
        margin-bottom: 0;
        padding-top: 10px;
        &.closed_collapse_title {
          padding-top:0;
        }
      }
    }
    .datesoccupancy {
      margin: 0;
      display: flex !important;
      flex-wrap: nowrap;
      flex: 0 1 auto;
      > .dates, [dir='rtl'] & > .dates {
        float:none;
        flex: 0 1 auto;
        width: auto;
        min-width: 280px;
      }
      > .occupancy-type, [dir='rtl'] & > .occupancy-type {
        float:none;
        width: auto;
        min-width: 160px;
        flex: 1 1 auto;
        margin-left: 0;
      }
      [lang|="ar"] & > .occupancy-type {
        min-width: 0;
      }
      > .occupancy-type {
        margin-right: 9px;
      }
    }
    .occupancy-layer-fieldset {
      margin-right: 9px;
      min-width: 130px;
      display: flex;
      height: 100%;
    }
    #flyplushotel .datesoccupancy>.occupancy-type, #flyplushotel .occupancy-layer-fieldset {
      margin-right: 0;
    }
    .occupancy-type {
      .bootstrap-select>.btn {
        height: 44px;
      }
    }
    .hotels_tor_options {
      padding-top: 10px;
      flex: 1 1 100%;
    }
    .title_collapse_container {
      margin-bottom: 0;
    }
  }
  .wide_searcher.home_search_box {
    width: 100%;
  }
  .wide_searcher.homeviajes_search_box {
    width: 100%;
  }
  /*ampliar el ancho del buscador de error en caso de que tenga clase wide searcher */
  .hotelsearchwidget.wide_searcher {
    width: 100%;
    max-width: 1170px;
    min-height: 0 !important;
    /* Correccion para FF - flexbox en FF no funciona bien con algunos elementos en absolute */
    #advanced_search_criteria_hotelsearchwidget0 {
      position: static;
      width: 0;
      height: 0;
    }
  }
  .wide_searcher.cont_buscador_error {
    fieldset.journeyselector {
      margin-bottom: 8px;
    }
    .continente_boton_submit button[type=submit] {
      height: 40px;
      font-size: 16px;
      line-height: 1;
      .bt-txt {
        line-height: 1;
      }

    }
  }
}
/* fin buscador */
@media (max-width: $screen-sm-max) {
  .wide_searcher {
    .multicriteriasearch {
      .tab-content .tab-pane {
        form:not([style*="display:none"]) {
          display: block !important;
        }
      }
    }
  }
}