/*****
 * SEARCH COMPONENT
 * 
 * Componente de búsqueda del header
 *****/

/* Tooltip de búsqueda */
div.tooltip.fade {
  display: none !important;
}

#search-form {
  text-align: left;
  z-index: 1 !important;
  position: relative;
}

/* Formulario de búsqueda principal */
div.search-block-form {
  position: absolute;
  right: 270px;
  top: 17px;
  width: 300px;
  border-radius: 8px;
  z-index: 999 !important;
}

div.search-block-form input.form-autocomplete,
div.search-block-form .btn-primary {
  border-radius: 8px;
}

.sticky div.search-block-form {
  top: 2px;
}

div.search-block-form .btn-primary {
  background-color: var(--blanco);
  border-left: 0;
  border-color: var(--gris-medio);
}

div.search-block-form .glyphicon {
  color: var(--gris);
}

div.search-block-form input.form-autocomplete {
  border-right: 0;
  border-color: var(--gris-medio);
}

div.search-block-form .input-group input[type=search] {
  width: 100px;
  float: right;
  -webkit-transition: width 0.4s ease-in-out;
  transition: width 0.4s ease-in-out;
}

div.search-block-form .input-group input[type=search]:focus {
  width: 250px;
}

/* Buscador alternativo */
#block-formularioexpuestobuscadorpage-1 {
  position: absolute;
  right: 205px;
  top: -2px;
  width: 300px;
  background: none;
  padding: 0;
}

#views-exposed-form-buscador-page-1 label.control-label {
  display: none;
}

#views-exposed-form-buscador-page-1 .form-type-textfield {
  width: 200px;
  margin: 0;
  padding: 0;
  height: 30px;
}

#views-exposed-form-buscador-page-1 .form-actions.form-group.js-form-wrapper.form-wrapper {
  padding: 0;
  margin: 0;
}

#views-exposed-form-buscador-page-1 input.form-text {
  height: 30px;
  border-right: 0;
  box-shadow: none;
  width: 210px;
  border-radius: 5px 0 0 5px;
}

#views-exposed-form-buscador-page-1 .form-control:focus {
  border-color: #CCC;
}

#views-exposed-form-buscador-page-1 span.input-group-addon {
  display: none;
}

#views-exposed-form-buscador-page-1 button.form-submit {
  width: 35px;
  height: 30px;
  margin: 0 0 0 -5px;
  color: transparent;
  border-radius: 0 8px 8px 0;
  background: none;
  border: 1px solid #CCC;
  border-left: 0;
}

#views-exposed-form-buscador-page-1 button.form-submit:focus {
  outline: 0;
}

#views-exposed-form-buscador-page-1 button.form-submit span {
  color: var(--gris);
  margin-left: 0px;
}

#views-exposed-form-buscador-page-1 button.form-submit span:hover {
  color: var(--verde);
}

.sticky #block-formularioexpuestobuscadorpage-1 {
  top: -20px;
}

/* Resultados de autocompletado */
#ui-id-1 li a.ui-menu-item-wrapper.ui-state-active {
  border: 0;
  background-color: none;
  padding: 0;
  margin: 0;
  height: auto;
}

.ui-widget-content .ui-state-active {
  background-color: none;
  border: 0;
  color: var(--gris);
}

#ui-id-1 li a.ui-menu-item-wrapper:hover {
  color: var(--verde);
}

li.ui-menu-item .ui-autocomplete-field-created {
  text-transform: uppercase;
  font-size: .8em;
}

/* Resultados de búsqueda */
.view-buscador .views-row {
  border-bottom: 1px solid #DDD;
  padding: 20px 0;
}

.view-buscador .views-row .views-field-type {
  font-size: .8em;
  text-transform: uppercase;
}

.view-buscador .views-row h3 {
  margin: 5px 0 0 0;
}

.view-buscador .views-row h3 a {
  text-decoration: none;
}

.view-buscador .views-row h3 a:hover {
  color: var(--verde);
}

/* Página de resultados de búsqueda */
.path-search .region-content ol li strong {
  background-color: var(--verde);
}

.path-search .region-content ol li {
  border-bottom: 1px solid #DDD;
  padding: 20px 0;
}

.path-search .region-content ol li h3 {
  padding: 5px 0;
  margin: 0;
}

.path-search .region-content ol li h3 a {
  text-decoration: none;
  font-weight: bold;
}

.path-search .region-content ol li h3 a:hover {
  text-decoration: underline;
}

.path-search .region-content ol li span.tipo {
  text-transform: uppercase;
  font-size: .9em;
}


i.abridor,
i.cerrador {
  display: none;
}

@media screen and (max-width: 768px) {
  #block-formularioexpuestobuscadorpage-1 {
    display: none;
  }
  
  #block-formularioexpuestobuscadorpage-1.buscar {
    display: block;
    position: fixed;
    right: 0;
    top: 0px;
    margin: 0;
    width: 100%;
    background: var(--negro);
    border-radius: 0;
    padding: 20px 20px 20px 20px;
    z-index: 999;
  }

  #block-formularioexpuestobuscadorpage-1.buscar div.form--inline {
    display: flex;
    justify-content: center;
    background: none;
  }

  #block-formularioexpuestobuscadorpage-1.buscar .form-type-textfield {
    text-align: center;
    background: none;
  }

  #block-formularioexpuestobuscadorpage-1.buscar .input-group {
    width: 100%;
    background: none;
  }

  #block-formularioexpuestobuscadorpage-1.buscar .form-actions {
    width: auto;
    padding: 0;
    background: none;
  }

  #block-formularioexpuestobuscadorpage-1.buscar .form-actions button {
    background: var(--blanco);
  }

  #block-formularioexpuestobuscadorpage-1.buscar i.abridor {
    display: block;
    top: 20px;
    right: 0;
    position: absolute;
    padding: 7px;
    border-radius: 50px;
    border: 2px solid var(--verde);
  }


  #block-formularioexpuestobuscadorpage-1.buscar i.cerrador {
    top: 0px;
    display: block;
    right: 0;
    position: absolute;
    padding: 7px;
    font-size: 30px;
    border-radius: 50px;
    color: var(--verde);
    z-index: 9999;
  }

  #block-formulariodebusqueda {
    display: none;
  }

  #block-formulariodebusqueda.buscar {
    display: block;
    position: fixed;
    right: 0;
    top: 0;
    width: 100%;
    background: var(--negro);
    border-radius: 0;
    padding: 20px 20px 0 20px;
    z-index: 999;
  }

  #block-formulariodebusqueda .input-group {
    width: 60%;
    margin: 0 auto;
  }

  #block-formulariodebusqueda .input-group input {
    width: 100%;
  }
}