/* ==================================================================
   PASTILLAS DE LA GRILLA — suaves, simples y claras (DESIGN.md §9.8)
   ------------------------------------------------------------------
   Antes cada reserva llevaba: un filo oscuro a la izquierda, un borde del
   color del estado, una banda de cobro a la derecha, las letras del país
   (en Windows la bandera se ve como "AR"), un cuadradito de canal y la
   tipografía en negrita forzada. Todo junto, sobre una pastilla de 28 px,
   se leía viejo y recargado.

   Ahora la pastilla dice lo que hace falta de un vistazo, en este orden:
     1. QUIÉN        el nombre, en una tipografía normal y legible
     2. SI PAGÓ      una sola marca a la derecha:
                       ✓ verde   = pagada
                       ◐ ámbar   = pagó una parte
                       ! rojo    = todavía no pagó
                     (sin precio cargado → sin marca)
     3. LO EXTRA     personas (si son más de una), canal (si no es el
                     mostrador) y notas, como fichas chicas y tenues
   El estado de la reserva lo da el color de relleno, sin bordes.
   País, teléfono y demás detalle: en la ficha rápida al pasar el mouse.
   Este archivo se carga al final, después de style.css y soft.css.
   ================================================================== */

.bkpill{
  top: 4px; bottom: 4px;
  display: flex; align-items: center; gap: 6px;
  padding: 0 9px !important;
  border: 0 !important;
  background: var(--bg);
  color: var(--tx);
  font-family: var(--font-body) !important;
  font-size: calc(var(--grid-font, 10px) + 2px) !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(15,23,42,.035), 0 1px 2px rgba(15,23,42,.07) !important;
  animation: none !important;
  transition: box-shadow .16s ease, background-color .16s ease;
}
.bkpill:hover{
  transform: none; filter: none;
  box-shadow: 0 0 0 1px rgba(15,23,42,.05), 0 4px 12px -2px rgba(15,23,42,.18) !important;
  z-index: 9;
}
.bkpill:active{ transform: none; }

/* Lo que ya no se dibuja en la pastilla (queda en la ficha rápida y en la ficha completa) */
.bkpill .bkp-edge, .bkpill .bkp-flag, .bkpill .bkp-payedge{ display: none !important; }

.bkp-name{
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0;
}
.bkp-meta{ display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.bkp-meta:empty{ display: none; }

/* Fichas chicas y tenues: personas · canal · notas */
.bkpill .bkp-pax{
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: rgba(255,255,255,.6); color: var(--tx);
  font-size: 10px; font-weight: 700; line-height: 1;
}
.bkpill .bkp-chan{
  width: 16px; height: 16px; border-radius: 50%; opacity: 1;
  background: color-mix(in srgb, var(--cc, #607d8b) 16%, #fff);
  color: color-mix(in srgb, var(--cc, #607d8b) 78%, #000);
  font-size: 9px; font-weight: 700;
}
.bkpill .bkp-chan.is-emoji{ background: none; font-size: 11px; }
.bkpill .bkp-ic{ opacity: .6; }
.bkpill .bkp-ic .ico{ width: 12px; height: 12px; }
.bkpill .bkp-warn{ background: var(--color-danger); border-radius: 50%; padding: 2px; }

/* Cobro: una marca redonda al final. Tres formas distintas, para no depender sólo del color */
.bkp-pay{
  flex-shrink: 0; width: 16px; height: 16px; border-radius: 50%;
  display: inline-grid; place-items: center; line-height: 1;
}
.bkp-pay svg{ width: 10px; height: 10px; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bkp-pay.is-paid{ background: rgba(22,163,74,.16); }
.bkp-pay.is-paid svg{ stroke: #15803d; }
.bkp-pay.is-partial{ background: conic-gradient(#e0a100 0 50%, rgba(224,161,0,.26) 0 100%); box-shadow: inset 0 0 0 1.5px rgba(224,161,0,.55); }
.bkp-pay.is-pending{ background: #e5484d; }
.bkp-pay.is-pending::after{ content: "!"; color: #fff; font: 800 10px/1 var(--font-body); }

/* Pastilla mínima: sólo iniciales, con la marca de cobro como puntito en la esquina */
.bkpill.is-tiny{ padding: 0 4px !important; justify-content: center; }
.bkpill.is-tiny .bkp-name{ flex: 0 1 auto; font-weight: 700; letter-spacing: .02em; text-align: center; }
.bkpill.is-tiny .bkp-meta{ display: none; }
.bkpill.is-tiny .bkp-pay{ position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; }
.bkpill.is-tiny .bkp-pay svg, .bkpill.is-tiny .bkp-pay::after{ display: none; }

/* Estados especiales */
.bkpill.is-ghost{ opacity: .5; font-style: normal; box-shadow: none !important; }
.bkpill.is-out{ opacity: .82; }
.bkpill.is-out .bkp-name{ font-weight: 500; }
.bkpill.is-expired{
  box-shadow: 0 0 0 1.5px var(--color-danger), 0 1px 2px rgba(15,23,42,.07) !important;
}
.bkpill.pill-expired-pulse{ animation: none !important; }
.bkpill[draggable="true"]{ cursor: grab; }
.bkpill[draggable="true"]:active{ cursor: grabbing; }

/* Teléfono y pantallas angostas: menos adornos, más lugar para el nombre */
@media (max-width: 640px){
  .bkpill{ padding: 0 7px !important; gap: 4px; }
  .bkpill .bkp-chan, .bkpill .bkp-ic{ display: none; }
  .bkp-pay{ width: 15px; height: 15px; }
}
