/* ============================================
   OVERRIDES FINALES — Buscador Normatividad
   (funcionan aunque .views-exposed-form esté FUERA)
   ============================================ */

/* 1) Contenedor exacto y sin rellenos */
html body .sed-exposed-wrapper{
  max-width: 1230px !important;
  width: 100% !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

/* 2) Sin “card” ni radios/sombras en el bloque */
html body .sed-filter--normatividad{
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
html body .sed-filter--normatividad.sed-filter-card{
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
}
.sed-filter-title{
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* 3) Grid */
html body .sed-filter--normatividad .sed-grid{ display: grid; gap: 12px; margin-top: 10px; }
html body .sed-filter--normatividad .sed-grid--2{ grid-template-columns: 1fr; }
@media (min-width: 720px){
  html body .sed-filter--normatividad .sed-grid--2{ grid-template-columns: 1fr 1fr; }
}

/* 4) Normaliza fieldsets que traen clases del tema (form-group, col-auto) */
html body .sed-filter--normatividad fieldset.form-group,
html body .sed-filter--normatividad .col-auto{
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* 5) Labels */
html body .sed-filter--normatividad .form-item > label{
  display: block !important;
  margin: 0 0 6px 0 !important;
  font: 500 20px/1.2 "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  color: #808080 !important;
}

/* 6) INPUTS/TEXTAREAS/SELECTS — 44px EXACTOS y sin esquinas.
      ¡Sin requerir .views-exposed-form en el selector! */
html body .sed-filter--normatividad input.form-control,
html body .sed-filter--normatividad select.form-control,
html body .sed-filter--normatividad textarea.form-control,
html body .sed-filter--normatividad input[type="text"],
html body .sed-filter--normatividad input[type="search"],
html body .sed-filter--normatividad input[type="number"],
html body .sed-filter--normatividad select,
html body .sed-filter--normatividad textarea{
  box-sizing: border-box !important;
  height: 44px !important;             /* ALTURA EXACTA */
  border: 1px solid #d1d5db !important;
  border-radius: 0 !important;          /* SIN redondeos */
  background: #fff !important;
  color: #111827 !important;
  font-size: 16px !important;
  margin: 0 !important;
  padding: 0 12px !important;           /* vertical 0; texto centrado con line-height */
  line-height: 44px !important;
  outline: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none; appearance: none;
}

/* Los SELECT no usan line-height fijo; dales padding vertical */
html body .sed-filter--normatividad select,
html body .sed-filter--normatividad select.form-control{
  line-height: normal !important;
  padding: 10px 36px 10px 12px !important; /* espacio para la flecha */
}

/* 7) Focus accesible */
html body .sed-filter--normatividad input:focus,
html body .sed-filter--normatividad select:focus{
  border-color: #2563eb !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12) !important;
}

/* 8) Botón azul a lo ancho (1230px), sin márgenes */
html body .sed-filter--normatividad .sed-actions{ margin-top: 14px; padding: 0 !important; }
html body .sed-filter--normatividad .form-actions{ margin: 0 !important; padding: 0 !important; width: 100% !important; grid-column: 1 / -1 !important; }
html body .sed-filter--normatividad .form-actions .form-submit,
html body .sed-filter--normatividad .sed-actions .form-submit,
html body .sed-filter--normatividad .sed-actions input[type="submit"],
html body .sed-filter--normatividad .sed-actions button[type="submit"]{
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 16px 0 !important;
  background: #000B69 !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 0 !important;
  font: 700 26px/1 "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  text-align: center !important;
  box-shadow: none !important;
  cursor: pointer;
}

/* 9) Si la página usa .container con padding lateral, quítalo SOLO aquí */
html body .container .sed-exposed-wrapper{
  padding-left: 0 !important;
  padding-right: 0 !important;
}


/* Más separación vertical entre filas del grid */
html body .sed-filter--normatividad .sed-grid{
  row-gap: 18px;          /* antes 12px */
  column-gap: 12px;
}

/* Asegura que cada fieldset ocupe toda su celda y sin colisiones de márgenes */
html body .sed-filter--normatividad fieldset.form-group{
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

/* Cuando el select está en "placeholder", se ve en gris */
html body .sed-filter--normatividad select.placeholder,
html body .sed-filter--normatividad .form-select.placeholder{
  color: #808080 !important;
}

/* Cuando el usuario selecciona una opción real */
html body .sed-filter--normatividad select.has-value,
html body .sed-filter--normatividad .form-select.has-value{
  color: #111827 !important;
}

/* Asegura que el select sea nativo y sin flecha del SO */
html body .sed-filter--normatividad select,
html body .sed-filter--normatividad select.form-control,
html body .sed-filter--normatividad .form-select{
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
}

/* Flecha SVG como background (gris #808080). 
   OJO: el %23 es # escapado en data URI */
html body .sed-filter--normatividad select,
html body .sed-filter--normatividad select.form-control,
html body .sed-filter--normatividad .form-select{
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%23808080' d='M7 10l5 5 5-5z'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 40px !important; /* espacio para la flecha */
}

/* Opcional: flecha azul en focus (#2563eb) */
html body .sed-filter--normatividad select:focus,
html body .sed-filter--normatividad .form-select:focus{
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path fill='%232563eb' d='M7 10l5 5 5-5z'/></svg>") !important;
}