/* ═══ Mi lista de compras (Fase 1) — estilos ═══
   Paleta del app: azul #4C6ED5, tinta #101014, muted #55555f, línea #e9e9ee. */

/* botón "+" en las tarjetas del explorador */
.grid .card { position: relative; }
.card-add {
  position: absolute; top: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  border: 1.5px solid #e9e9ee; background: rgba(255, 255, 255, .95);
  color: #4C6ED5; font-size: 22px; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 16, 20, .16); transition: transform .12s, background .12s;
}
.card-add:active { transform: scale(.9); }
.card-add.on { background: #4C6ED5; color: #fff; border-color: #4C6ED5; font-size: 16px; }

/* botón "Agregar a mi lista" en la vista de receta */
.r-add {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 16px;
  font-family: inherit; font-size: 15px; font-weight: 700; cursor: pointer;
  color: #fff; background: #4C6ED5; border: 1.5px solid #4C6ED5;
  border-radius: 12px; padding: 12px 20px; transition: transform .12s, background .12s;
}
.r-add:active { transform: scale(.98); }
.r-add.on { background: #0B9463; border-color: #0B9463; }

/* botón flotante */
.lista-fab {
  position: fixed; bottom: 18px; right: 18px; z-index: 900;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: inherit; font-size: 15px; font-weight: 700; color: #fff; cursor: pointer;
  background: #4C6ED5; border: 0; border-radius: 999px; padding: 13px 20px;
  box-shadow: 0 10px 28px rgba(76, 110, 213, .42); transition: transform .12s;
}
.lista-fab:active { transform: scale(.97); }
.lista-fab-ico { font-size: 18px; }
.lista-fab-n {
  min-width: 22px; height: 22px; border-radius: 999px; background: #fff; color: #4C6ED5;
  font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px;
}

/* backdrop + panel (drawer derecha desktop / sheet abajo mobile) */
/* el atributo hidden tiene que ganarle al display:flex/fixed del panel */
.lista-backdrop[hidden], .lista-panel[hidden] { display: none !important; }
.lista-backdrop { position: fixed; inset: 0; z-index: 950; background: rgba(16, 16, 20, .5); }
.lista-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 960;
  width: min(440px, 100%); background: #fff; display: flex; flex-direction: column;
  box-shadow: -14px 0 40px rgba(16, 16, 20, .22); font-family: inherit;
}
.lista-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px; border-bottom: 1px solid #e9e9ee;
}
.lista-title { font-size: 18px; font-weight: 800; color: #101014; }
.lista-x { font-size: 26px; line-height: 1; color: #55555f; background: none; border: 0; cursor: pointer; padding: 0 4px; }
.lista-sub { padding: 12px 20px 0; font-size: 13px; color: #55555f; font-weight: 600; }
.lista-sub:empty { display: none; }
.lista-actions { display: flex; gap: 10px; padding: 12px 20px; }
.lista-print {
  flex: 1; font-family: inherit; font-size: 14px; font-weight: 700; color: #fff; cursor: pointer;
  background: #4C6ED5; border: 0; border-radius: 11px; padding: 11px;
}
.lista-clear {
  font-family: inherit; font-size: 14px; font-weight: 600; color: #b32e2e; cursor: pointer;
  background: none; border: 1.5px solid #e9e9ee; border-radius: 11px; padding: 11px 16px;
}
.lista-body { flex: 1; overflow-y: auto; padding: 4px 20px 20px; }
.lista-note {
  padding: 12px 20px 18px; font-size: 12.5px; color: #55555f; line-height: 1.4;
  border-top: 1px solid #e9e9ee; background: #f7f8fb;
}
.lista-note b { color: #4C6ED5; }

/* recetas dentro del panel */
.l-recipe { padding: 16px 0; border-bottom: 1px solid #f0f0f4; }
.l-recipe:last-child { border-bottom: 0; }
.l-recipe-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.l-recipe-t { font-size: 15.5px; font-weight: 800; color: #101014; text-decoration: none; }
.l-recipe-t:hover { color: #4C6ED5; }
.l-remove { font-family: inherit; font-size: 12.5px; font-weight: 600; color: #b32e2e; background: none; border: 0; cursor: pointer; white-space: nowrap; padding: 0; }
.l-recipe-rinde { display: inline-block; font-size: 12px; color: #8b8b96; font-weight: 600; margin-top: 3px; }
.l-ings { list-style: none; margin: 10px 0 0; padding: 0; }
.l-ing { font-size: 14px; color: #2a2a30; margin: 2px 0; }
.l-ing label { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; line-height: 1.4; }
.l-ing input { margin-top: 3px; width: 16px; height: 16px; accent-color: #4C6ED5; flex: 0 0 auto; }
.l-ing b { font-weight: 700; }
.l-ing-sub { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #8b8b96; margin: 12px 0 4px; }

/* vacío */
.lista-empty { text-align: center; padding: 40px 20px; }
.lista-empty-ico { font-size: 40px; }
.lista-empty-t { font-size: 16px; font-weight: 800; color: #101014; margin: 10px 0 4px; }
.lista-empty-p { font-size: 13.5px; color: #55555f; line-height: 1.45; max-width: 260px; margin: 0 auto; }

@media (max-width: 560px) {
  .lista-panel { top: auto; left: 0; right: 0; bottom: 0; width: auto; max-height: 86vh; border-radius: 20px 20px 0 0; }
  .lista-fab { bottom: 14px; right: 14px; }
}

/* imprimir / guardar PDF: solo la lista */
@media print {
  body > *:not(#lista-root) { display: none !important; }
  .lista-fab, .lista-backdrop, .lista-x, .lista-actions, .lista-note, .l-remove { display: none !important; }
  .lista-panel { position: static !important; width: auto !important; box-shadow: none !important; max-height: none !important; }
  .lista-body { overflow: visible !important; }
  .lista-head { border: 0; }
  .l-ing input { -webkit-appearance: none; appearance: none; border: 1.4px solid #333; border-radius: 3px; }
}
