/**
 * Estilos del buscador de Compras y Contrataciones.
 */

#views-exposed-form-cyc-block-1 {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  background: #fff;
  /*border: 1px solid #e0e0e0;*/
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  width: 100%;
  margin: 10px 0 10px 0;
}

/* Todos los form-item en una sola fila */
#views-exposed-form-cyc-block-1 .js-form-item {
  flex: 0 0 auto;
  margin: 3px;
  padding: 0;
 /* border-right: 1px solid #e0e0e0;*/
  position: relative;
  display: flex;
  align-items: center;
}

/* El campo de texto ocupa el espacio restante */
#views-exposed-form-cyc-block-1 .js-form-item-combine {
  flex: 1 1 auto;
  border-right: none;
}

/* Labels ocultos */
#views-exposed-form-cyc-block-1 label {
  display: none;
}

/* Selects — ancho fijo para que no ocupen demasiado */
#views-exposed-form-cyc-block-1 select.form-select {
  width: auto;
  min-width: 140px;
  /*border: none;*/
  outline: none;
  background: transparent;
  padding: 10px 30px 10px 16px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23666' stroke-width='1.5' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  border-radius: 5px;
  font-family: 'Inter', sans-serif !important;
            font-weight: 400;
            font-size: 15px;
            color: #004998;
  box-shadow: 1px 0px 8px rgb(0 0 0 / 18%);
}

#views-exposed-form-cyc-block-1 select.form-select:focus {
  box-shadow: none;
  outline: none;
}

/* Input de texto */
#views-exposed-form-cyc-block-1 input.form-text {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 8px 10px 16px;
  font-size: 0.9rem;
  color: #333;
  background: transparent;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="gray" class="bi bi-search" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 18px;
    box-shadow: 1px 0px 8px rgb(0 0 0 / 18%) !important;
    border-radius: 5px;
}

#views-exposed-form-cyc-block-1 input.form-text::placeholder {
  color: #999;
}

#views-exposed-form-cyc-block-1 input.form-text:focus {
  box-shadow: none;
  outline: none;
}

/* Botón lupa */
#views-exposed-form-cyc-block-1 .cyc-lupa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0 14px;
  cursor: pointer;
  color: #999;
  flex-shrink: 0;
  transition: color 0.2s;
  height: 100%;
}

#views-exposed-form-cyc-block-1 .cyc-lupa-btn:hover {
  color: #333;
}

#views-exposed-form-cyc-block-1 .cyc-lupa-btn svg {
  display: block;
  width: 18px;
  height: 18px;
}

/* .form-actions se maneja abajo con el botón limpiar */

/* Responsive */
@media (max-width: 768px) {
  #views-exposed-form-cyc-block-1 {
    flex-wrap: wrap;
  }

  #views-exposed-form-cyc-block-1 .js-form-item {
    flex: 1 1 45%;
    border-bottom: 1px solid #e0e0e0;
  }

  #views-exposed-form-cyc-block-1 .js-form-item-combine {
    flex: 1 1 100%;
    border-right: none;
    border-bottom: none;
  }

  #views-exposed-form-cyc-block-1 select.form-select {
    width: 100%;
    min-width: unset;
  }
}

/* Botón limpiar */
#views-exposed-form-cyc-block-1 .form-actions {
  display: flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  /*border-left: 1px solid #e0e0e0;*/
}

#views-exposed-form-cyc-block-1 .cyc-limpiar-btn {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0 16px;
  cursor: pointer;
  color: #999;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: color 0.2s;
  flex-shrink: 0;
}

#views-exposed-form-cyc-block-1 .cyc-limpiar-btn:hover {
  color: #e00;
}

/* Ocultar el botón submit nativo de Drupal */
#views-exposed-form-cyc-block-1 .form-actions input[type="submit"] {
  display: none;
}
