/* PulsePOS – shared stylesheet */

/* ── Alpine x-cloak (hide before Alpine initialises) ────────────── */
[x-cloak] { display: none !important; }

/* ── Scrollbars ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ── Product card hover glow ────────────────────────────────────── */
.product-card {
  transition: transform .15s ease, box-shadow .15s ease;
}
.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
}
.product-card:active { transform: translateY(0); }

/* ── Mobile tap behavior (avoid iOS double-tap zoom on products) ───────── */
.product-card {
  touch-action: manipulation;
}

/* ── Category pill active state ─────────────────────────────────── */
.cat-pill.active {
  color: #fff !important;
}

/* ── Cart item row ──────────────────────────────────────────────── */
.cart-row { transition: background .1s; }
.cart-row:hover { background: #f8fafc; }

/* ── Number input no spinners ───────────────────────────────────── */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { appearance: textfield; -moz-appearance: textfield; }

/* ── Modal backdrop ─────────────────────────────────────────────── */
.modal-backdrop {
  backdrop-filter: blur(2px);
}

/* ── Print: receipt only ────────────────────────────────────────── */
@media print {
  body > * { display: none !important; }
  #receipt-print { display: block !important; }

  #receipt-print {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    width: 72mm;
    margin: 0 auto;
    padding: 8px;
    color: #000;
  }
  #receipt-print .r-divider {
    border-top: 1px dashed #000;
    margin: 6px 0;
  }
  #receipt-print .r-title {
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 4px;
  }
  #receipt-print .r-center { text-align: center; }
  #receipt-print .r-row {
    display: flex;
    justify-content: space-between;
  }
  #receipt-print .r-total {
    font-size: 14px;
    font-weight: bold;
  }
}

/* ── Toast notification ─────────────────────────────────────────── */
.toast-enter { animation: slideUp .25s ease; }
.toast-leave { animation: slideDown .25s ease forwards; }

@keyframes slideUp {
  from { opacity:0; transform:translateY(20px); }
  to   { opacity:1; transform:translateY(0);    }
}
@keyframes slideDown {
  from { opacity:1; transform:translateY(0);    }
  to   { opacity:0; transform:translateY(20px); }
}

/* ── Low-stock badge pulse ──────────────────────────────────────── */
.pulse-badge {
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; }
  50%      { opacity:.5; }
}

/* ── Nav active link ────────────────────────────────────────────── */
.nav-link.active {
  background: rgba(255,255,255,.2);
  border-radius: 6px;
}
