/* ------------------------------------------------------------
 * Android Holo theme (clonado) para inputs y select
 * + variantes de búsqueda
 *
 *  ⌁ Cambios clave 2025-05-17
 *    • Se excluyen *también* los <input type="radio"> del estilo Holo
 *      (igual que ya se hacía con los checkboxes de la tabla).
 *    • El reset final SOLO afecta a los checkboxes
 *      (.row-select-checkbox + .form-check-input[type="checkbox"]).
 *      Los radios conservan el look Bootstrap por defecto.
 * ------------------------------------------------------------ */

/* Tipografía y reset general */
body,
input,
select {
  border-radius: 0 !important;
  border-width: 0 !important;
  box-shadow: none !important;
  font-family: "Roboto", "Droid Sans", sans-serif;
  font-size: 16px;
}

/* ────────────────────────────────────────────────────────────
   ESTILO HOLO BASE
   — se aplica a TODOS los inputs y selects EXCEPTO:
       • checkbox  (.row-select-checkbox  y   [type="checkbox"])
       • radio     ([type="radio"])
   ──────────────────────────────────────────────────────────── */
input:not([type="checkbox"]):not([type="radio"]):not(.row-select-checkbox),
select {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  border-radius: 0;
  outline: none;

  position: relative;
  box-sizing: border-box;
  padding: 8px 8px 6px;

  /* líneas Holo en gris */
  background:
    bottom left linear-gradient(#a9a9a9, #a9a9a9) no-repeat,
    bottom center linear-gradient(#a9a9a9, #a9a9a9) repeat-x,
    bottom right linear-gradient(#a9a9a9, #a9a9a9) no-repeat;
  background-size: 1px 6px, 1px 1px, 1px 6px;
}

/* Disabled (excepto checkbox & radio) */
input:not([type="checkbox"]):not([type="radio"]):not(.row-select-checkbox)[disabled],
input:not([type="checkbox"]):not([type="radio"]):not(.row-select-checkbox).disabled,
select[disabled],
select.disabled {
  color: #a9a9a9;
  background:
    bottom left linear-gradient(#cecece, #cecece) no-repeat,
    bottom center linear-gradient(#cecece, #cecece) repeat-x,
    bottom right linear-gradient(#cecece, #cecece) no-repeat;
  background-size: 1px 6px, 1px 1px, 1px 6px;
}

/* Focus (excepto checkbox & radio) */
input:not([type="checkbox"]):not([type="radio"]):not(.row-select-checkbox):focus,
select:focus {
  background:
    bottom left linear-gradient(#0099cc, #0099cc) no-repeat,
    bottom center linear-gradient(#0099cc, #0099cc) repeat-x,
    bottom right linear-gradient(#0099cc, #0099cc) no-repeat;
  background-size: 1px 6px, 1px 1px, 1px 6px;
}

/* ----  validación (mantiene selector original) ---- */
.is-invalid {
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='red'%20viewBox='0%200%2016%2016'%3E%3Cpath%20d='M7.938%202.016A.13.13%200%200%201%208.002%202a.13.13%200%200%201%20.063.016.15.15%200%200%201%20.054.057l6.857%2011.667c.036.06.035.124.002.183a.2.2%200%200%201-.054.06.1.1%200%200%201-.066.017H1.146a.1.1%200%200%201-.066-.017.2.2%200%200%201-.054-.06.18.18%200%200%201%20.002-.183L7.884%202.073a.15.15%200%200%201%20.054-.057m1.044-.45a1.13%201.13%200%200%200-1.96%200L.165%2013.233c-.457.778.091%201.767.98%201.767h13.713c.889%200%201.438-.99.98-1.767z'/%3E%3Cpath%20d='M7.002%2012a1%201%200%201%201%202%200%201%201%200%200%201-2%200M7.1%205.995a.905.905%200%201%201%201.8%200l-.35%203.507a.552.552%200%200%201-1.1%200z'/%3E%3C/svg%3E") no-repeat right 0.75rem center,
    bottom left linear-gradient(#ff0000, #ff0000) no-repeat,
    bottom center linear-gradient(#ff0000, #ff0000) repeat-x,
    bottom right linear-gradient(#ff0000, #ff0000) no-repeat !important;
  background-size: 1em 1em, 1px 6px, 1px 1px, 1px 6px !important;
  outline: none;
}

/* ------------------------------------------------------------
   Variante con icono de búsqueda        (sin cambios)
   ------------------------------------------------------------ */
.input-search {
  padding-right: 2.75rem; /* Aumentado de 2.5rem para asegurar más espacio */
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20viewBox='0%200%2016%2016'%3E%3Cpath%20d='M11.742%2010.344a6.5%206.5%200%201%200-1.397%201.398h-.001q.044.06.098.115l3.85%203.85a1%201%200%200%200%201.415-1.414l-3.85-3.85a1%201%200%200%200-.115-.1zM12%206.5a5.5%205.5%200%201%201-11%200%205.5%205.5%200%200%201%2011%200'/%3E%3C/svg%3E") no-repeat right 0.75rem center,
    bottom left linear-gradient(#a9a9a9, #a9a9a9) no-repeat,
    bottom center linear-gradient(#a9a9a9, #a9a9a9) repeat-x,
    bottom right linear-gradient(#a9a9a9, #a9a9a9) no-repeat !important;
  background-size: 1em 1em, 1px 6px, 1px 1px, 1px 6px !important;
  outline: none;
}

.input-search:focus {
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3E%3Crect%20width='16'%20height='16'%20fill='white'/%3E%3Cpath%20fill='currentColor'%20d='M11.742%2010.344a6.5%206.5%200%201%200-1.397%201.398h-.001q.044.06.098.115l3.85%203.85a1%201%200%200%200%201.415-1.414l-3.85-3.85a1%201%200%200%200-.115-.1zM12%206.5a5.5%205.5%200%201%201-11%200%205.5%205.5%200%200%201%2011%200'/%3E%3C/svg%3E") no-repeat right 0.75rem center,
    bottom left linear-gradient(#0099cc, #0099cc) no-repeat,
    bottom center linear-gradient(#0099cc, #0099cc) repeat-x,
    bottom right linear-gradient(#0099cc, #0099cc) no-repeat !important;
  background-size: 1em 1em, 1px 6px, 1px 1px, 1px 6px !important;
  outline: none;
}

.input-search:disabled,
.input-search[disabled] {
  color: #cecece;
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20fill='currentColor'%20viewBox='0%200%2016%2016'%3E%3Cpath%20d='M11.742%2010.344a6.5%206.5%200%201%200-1.397%201.398h-.001q.044.06.098.115l3.85%203.85a1%201%200%200%200%201.415-1.414l-3.85-3.85a1%201%200%200%200-.115-.1zM12%206.5a5.5%205.5%200%201%201-11%200%205.5%205.5%200%200%201%2011%200'/%3E%3C/svg%3E") no-repeat right 0.75rem center,
    linear-gradient(#cecece, #cecece) no-repeat bottom left,
    linear-gradient(#cecece, #cecece) repeat-x bottom center,
    linear-gradient(#cecece, #cecece) no-repeat bottom right !important;
  background-size: 1em 1em, 1px 6px, 1px 1px, 1px 6px !important;
  outline: none;
}

/* ------------------------------
  Soporte tema oscuro
  ------------------------------ */
[data-bs-theme="dark"] .input-search:focus {
  color: #ffffff;
  background:
   url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3E%3Crect%20width='16'%20height='16'%20fill='none'/%3E%3Cpath%20fill='white'%20d='M11.742%2010.344a6.5%206.5%200%201%200-1.397%201.398h-.001q.044.06.098.115l3.85%203.85a1%201%200%200%200%201.415-1.414l-3.85-3.85a1%201%200%200%200-.115-.1zM12%206.5a5.5%205.5%200%201%201-11%200%205.5%205.5%200%200%201%2011%200'/%3E%3C/svg%3E") no-repeat right 0.75rem center,
   bottom left linear-gradient(#0099cc, #0099cc) no-repeat,
   bottom center linear-gradient(#0099cc, #0099cc) repeat-x,
   bottom right linear-gradient(#0099cc, #0099cc) no-repeat !important;
  background-size: 1em 1em, 1px 6px, 1px 1px, 1px 6px !important;
  outline: none;
}

[data-bs-theme="dark"] .input-search {
  color: #ffffff;
  background:
   url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3E%3Crect%20width='16'%20height='16'%20fill='none'/%3E%3Cpath%20fill='white'%20d='M11.742%2010.344a6.5%206.5%200%201%200-1.397%201.398h-.001q.044.06.098.115l3.85%203.85a1%201%200%200%200%201.415-1.414l-3.85-3.85a1%201%200%200%200-.115-.1zM12%206.5a5.5%205.5%200%201%201-11%200%205.5%205.5%200%200%201%2011%200'/%3E%3C/svg%3E") no-repeat right 0.75rem center,
   linear-gradient(#cecece, #cecece) no-repeat bottom left,
   linear-gradient(#cecece, #cecece) repeat-x bottom center,
   linear-gradient(#cecece, #cecece) no-repeat bottom right !important;
  background-size: 1em 1em, 1px 6px, 1px 1px, 1px 6px !important;
  outline: none;
}

/* ---- select en tema oscuro ---- */
[data-bs-theme="dark"] select {
  color: #ffffff;
  background:
    bottom left linear-gradient(#cecece, #cecece) no-repeat,
    bottom center linear-gradient(#cecece, #cecece) repeat-x,
    bottom right linear-gradient(#cecece, #cecece) no-repeat,
    #212529 !important;
  background-size: 1px 6px, 1px 1px, 1px 6px, auto !important;
}

[data-bs-theme="dark"] select:focus {
  color: #ffffff;
  background:
    bottom left linear-gradient(#0099cc, #0099cc) no-repeat,
    bottom center linear-gradient(#0099cc, #0099cc) repeat-x,
    bottom right linear-gradient(#0099cc, #0099cc) no-repeat,
    #212529 !important;
  background-size: 1px 6px, 1px 1px, 1px 6px, auto !important;
}

/* Estilo para las opciones del select en tema oscuro */
[data-bs-theme="dark"] select option {
  background: #212529;
  color: #ffffff;
}

/* ------------------------------------------------------------
   RESET NATIVO PARA CHECKBOXES DE LA TABLA
   (checkbox Bootstrap + tu .row-select-checkbox)
   ------------------------------------------------------------ */
input.row-select-checkbox,
input.form-check-input[type="checkbox"] {
  all: unset;
  -webkit-appearance: checkbox !important;
  -moz-appearance: checkbox !important;
  appearance: auto !important;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 16px;
  height: 16px;
  cursor: pointer;
  display: inline-block;
  margin: 0;
}