/* MEALSA Buscador rápido 0.6.6: estilos aislados del tema */
.mealsa-fast-original-hidden { display: none !important; }
.mealsa-fast-form, .mealsa-fast-form * { box-sizing: border-box; }
.mealsa-fast-form { width:100%; max-width:100%; min-width:160px; flex:1 1 auto; margin:0; position:relative; font-family:inherit; font-size:14px; }
.mealsa-fast-form form { margin:0 !important; padding:0 !important; width:100%; }
.mealsa-fast-label { position:absolute!important; width:1px!important; height:1px!important; clip:rect(0,0,0,0)!important; overflow:hidden!important; white-space:nowrap!important; }
.mealsa-fast-line { display:flex; align-items:center; width:100%; min-height:46px; position:relative; overflow:hidden; border-radius:6px; border:1px solid #d5d5d5; background:#fff; color:#262626; transition:border-color .15s,box-shadow .15s; }
.mealsa-fast-line:focus-within { border-color:#bc2820; box-shadow:0 0 0 2px rgba(194,36,29,.14); }
.mealsa-fast-magnifier { margin-left:13px; margin-right:8px; width:18px; height:18px; flex:0 0 18px; fill:none; stroke:#707070; stroke-width:2; stroke-linecap:round; }
.mealsa-fast-form input.mealsa-fast-input { flex:1 1 auto; width:0; min-width:40px; max-width:100%; background:transparent!important; border:0!important; box-shadow:none!important; outline:0!important; margin:0!important; height:44px!important; line-height:1.3!important; padding:9px 3px!important; color:#262626!important; font-size:14px!important; border-radius:0!important; }
.mealsa-fast-form .mealsa-fast-input::placeholder { color:#757575; opacity:1; }
.mealsa-fast-form button.mealsa-fast-submit { flex:0 0 auto; display:inline-flex; align-items:center; justify-content:center; align-self:stretch; padding:0 19px!important; border:0!important; margin:0!important; min-height:44px; min-width:76px; background:#c83029!important; color:#fff!important; border-radius:0!important; font-size:14px; font-weight:600; cursor:pointer; line-height:1.1; box-shadow:none!important; }
.mealsa-fast-form button.mealsa-fast-submit:hover,.mealsa-fast-form button.mealsa-fast-submit:focus { background:#a9231c!important; }
.mealsa-fast-metrics { color:#777; font-size:12px; margin-top:5px; }
.mealsa-fast-metrics:empty { display:none; }
.mealsa-fast-dropdown, .mealsa-fast-dropdown * { box-sizing:border-box; }
.mealsa-fast-dropdown { font-family:inherit; position:fixed!important; z-index:2147480000!important; border:1px solid #ddd; border-radius:7px; background:#fff; color:#292929; box-shadow:0 12px 30px rgba(0,0,0,.18); overscroll-behavior:contain; overflow-y:auto; overflow-x:hidden; font-size:14px; line-height:1.45; }
.mealsa-fast-dropdown[hidden] { display:none!important; }
.mealsa-fast-heading { padding:9px 13px 7px; background:#f5f5f5; font-size:11px; color:#686868; font-weight:700; letter-spacing:.06em; }
.mealsa-fast-item, .mealsa-fast-tax, .mealsa-fast-more { display:flex; color:#292929!important; text-decoration:none!important; cursor:pointer; background:#fff; align-items:center; font-family:inherit; line-height:1.35; }
.mealsa-fast-item { gap:11px; padding:9px 12px; border-bottom:1px solid #ededed; min-height:62px; }
.mealsa-fast-item:hover,.mealsa-fast-item:focus,.mealsa-fast-item.mealsa-fast-selected, .mealsa-fast-tax:hover,.mealsa-fast-tax.mealsa-fast-selected { background:#fff5f4!important; color:#252525!important; outline:0; }
.mealsa-fast-photo { height:47px; width:47px; min-width:47px; display:flex; align-items:center; justify-content:center; background:#fff; border-radius:3px; overflow:hidden; }
.mealsa-fast-photo img { max-width:47px!important; max-height:47px!important; width:auto!important; height:auto!important; object-fit:contain!important; }
.mealsa-fast-no-photo { color:#bbb; font-size:25px; }
.mealsa-fast-product-text { display:flex; flex-direction:column; gap:4px; min-width:0; max-width:100%; }
.mealsa-fast-product-title { font-size:13px; font-weight:600; color:#333; white-space:normal; overflow-wrap:anywhere; }
.mealsa-fast-sku { color:#757575; font-size:11px; overflow-wrap:anywhere; }
.mealsa-fast-tax { font-size:13px; min-height:35px; padding:8px 13px; border-bottom:1px solid #f2f2f2; }
.mealsa-fast-more { display:block; padding:12px; font-size:13px; font-weight:700; text-align:center; background:#fafafa; color:#bc3029!important; }
.mealsa-fast-more:hover { background:#fbeeed; }
.mealsa-fast-empty,.mealsa-fast-loading { padding:15px; margin:0; color:#666; font-size:13px; }
.mealsa-fast-admin { max-width:1150px; }
.mealsa-fast-admin .form-table th { width:220px; }
.mealsa-fast-admin .form-table input[type="number"] { width:85px; }
.mealsa-fast-lab { padding:15px; border:1px solid #ddd; border-radius:6px; background:white; max-width:850px; }
.mealsa-fast-lab .mealsa-fast-form { max-width:750px; }
.mealsa-fast-comparison { overflow-x:auto; }
.mealsa-fast-comparison table { width:100%; }
@media (max-width:600px) {
  .mealsa-fast-form { min-width:0; }
  .mealsa-fast-form .mealsa-fast-input { font-size:16px!important; }
  .mealsa-fast-form button.mealsa-fast-submit { min-width:57px; padding:0 12px!important; font-size:12px; }
  .mealsa-fast-dropdown { border-radius:5px; }
  .mealsa-fast-item { padding:10px; min-height:60px; }
}

/* Integración nativa: el shortcode se renderiza dentro de las columnas del tema. */
.main-header-col2 > .mealsa-fast-form,
.below-header-col2 > .mealsa-fast-form,
.search-wrapper .mealsa-fast-form,
.sticky-header .mealsa-fast-form { width:100%; max-width:100%; }
.mealsa-fast-header { margin:0 !important; }
.mealsa-fast-header .mealsa-fast-line { height:46px; min-height:46px; border-radius:5px; }
.mealsa-fast-header .mealsa-fast-submit { border-radius:0 4px 4px 0 !important; }
.mealsa-fast-header .mealsa-fast-input { -webkit-appearance:none; appearance:none; }
/* En el frontal no hay métricas; ni siquiera para administradores. */
body:not(.wp-admin) .mealsa-fast-metrics { display:none!important; }
.mealsa-fast-icon-trigger { display:inline-flex; width:42px; height:42px; align-items:center; justify-content:center; color:inherit; cursor:pointer; }
.mealsa-fast-icon-trigger svg { width:20px; height:20px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; }
.mealsa-fast-icon-trigger:focus-visible { outline:2px solid currentColor; outline-offset:2px; }
.search-wrapper .mealsa-fast-form { flex:auto; }
@media(max-width:768px) {
 .search-wrapper .mealsa-fast-header { width:100%; }
 .mealsa-fast-header .mealsa-fast-line { min-height:44px; height:44px; }
}

/* MEALSA 0.6.1: estilo de barra compacta tipo píldora de la cabecera original.
   No modifica el laboratorio ni el desplegable, solo el formulario de cabecera. */
.main-header .main-header-col2 .mealsa-fast-header,
.below-header .below-header-col2 .mealsa-fast-header,
.sticky-header .mealsa-fast-header {
  width:100% !important;
  max-width:650px !important;
  flex:0 1 650px !important;
  margin-left:auto !important;
  margin-right:auto !important;
}
.mealsa-fast-header .mealsa-fast-line {
  height:56px;
  min-height:56px;
  border:1px solid #c7c7c7;
  border-radius:9999px !important;
  background:#fff;
  box-shadow:none;
}
.mealsa-fast-header .mealsa-fast-magnifier { display:none; }
.mealsa-fast-header input.mealsa-fast-input {
  height:52px !important;
  min-height:0 !important;
  padding:10px 14px !important;
  font-size:13px !important;
}
.mealsa-fast-header button.mealsa-fast-submit {
  align-self:center !important;
  margin:4px !important;
  height:38px !important;
  min-height:38px !important;
  min-width:77px;
  padding:0 16px !important;
  border-radius:9999px !important;
  background:#c8312a !important;
  font-size:13px !important;
}
@media (max-width:767px) {
  .main-header .main-header-col2 .mealsa-fast-header,
  .below-header .below-header-col2 .mealsa-fast-header,
  .sticky-header .mealsa-fast-header,
  .search-wrapper .mealsa-fast-header {
    max-width:100% !important;
    flex:1 1 100% !important;
  }
  .mealsa-fast-header .mealsa-fast-line { height:46px; min-height:46px; }
  .mealsa-fast-header input.mealsa-fast-input { height:42px !important; padding:7px 12px !important; font-size:16px !important; }
  .mealsa-fast-header button.mealsa-fast-submit { min-width:66px; min-height:34px !important; height:34px !important; padding:0 12px !important; }
}

/* MEALSA 0.6.6: resultados móviles utilizables con el teclado abierto. */
.mealsa-fast-mobile-tools { display:none; }
@media (max-width:767px) {
  .mealsa-fast-dropdown {
    overscroll-behavior:contain;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
  }
  .mealsa-fast-mobile-tools {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:8px;
    position:sticky;
    top:0;
    z-index:2;
    min-height:40px;
    padding:5px 10px;
    border-bottom:1px solid #e8e8e8;
    background:#fff;
    box-shadow:0 1px 3px rgba(0,0,0,.05);
  }
  .mealsa-fast-mobile-tools-label {
    color:#555;
    font-size:12px;
    font-weight:600;
  }
  .mealsa-fast-keyboard-toggle {
    -webkit-appearance:none;
    appearance:none;
    border:1px solid #c8312a!important;
    background:#fff!important;
    color:#c8312a!important;
    border-radius:16px!important;
    padding:6px 11px!important;
    min-height:30px;
    font-size:12px!important;
    line-height:1.2!important;
    font-weight:600;
    cursor:pointer;
    white-space:nowrap;
  }
  .mealsa-fast-keyboard-toggle:focus-visible { outline:2px solid #c8312a; outline-offset:2px; }
}
