/*====================================
  Global Theme Overrides
====================================*/
/* body styles now in tokens.css */

/*====================================
  Tipografía Financiera (Next-Gen)
====================================*/
.cl-money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cl-money-symbol {
  opacity: 0.6;
  font-size: 0.85em;
  margin-right: 1px;
}
.cl-money-decimal {
  opacity: 0.6;
  font-size: 0.85em;
}

/*====================================
  Tablas de Datos (Next-Gen)
====================================*/
.cl-table th {
  position: sticky;
  top: 0;
  background-color: var(--cl-bg-secondary);
  z-index: 10;
}
.cl-table tbody tr {
  transition: background-color 0.15s ease;
}
.cl-table tbody tr:hover {
  background-color: var(--cl-gray-50);
}
[data-theme="dark"] .cl-table tbody tr:hover {
  background-color: var(--cl-gray-800);
}

/*====================================
  Navbar
====================================*/
/* Custom class to push items to the right */
.navbar .nav-right {
  margin-left: auto;
}

/*====================================
  Buttons
====================================*/
/* Small wide button */
.btn-wide-sm {
  padding: 0.35rem 1rem;
  font-size: 0.875rem;
}

/*====================================
  Inputs
====================================*/
/* Fixed-width quantity input */
.qty-input {
  width: 50px;
  text-align: center;
}

/*====================================
  Cards
====================================*/
/* Light shadow cards */
.card-light {
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Tight-spacing cards */
.card-tight {
  margin-bottom: 0.5rem;
  padding: 0.75rem;
}

/*====================================
  Accordion (Detalle de Orden)
====================================*/
.accordion .accordion-header {
  background-color: #111;
  color: #fff;
}
.accordion .accordion-button {
  background-color: #222;
  color: #fff;
}
.accordion .accordion-button:not(.collapsed) {
  background-color: #333;
  color: #fff;
}

/* Utility spacing (.m-*, .p-*) and .hidden removed — use Bootstrap 5 utilities */

/*====================================
  Product Cards (clickable items)
====================================*/
.product-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 8px rgba(255, 255, 255, 0.2);
}
.product-card:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px var(--cl-overlay-strong);
}

/*====================================
  List Group Dark Items
====================================*/
.list-group-item-dark {
  background-color: #222;
  color: #fff;
  border: 1px solid #333;
}
.list-group-item-dark + .list-group-item-dark {
  border-top: none;
}


/* Theme variables now defined in tokens.css */

/* Legacy compat — CasaLeones brand buttons */

.btn {
  padding: 0.4rem 0.9rem;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: 0.25rem;
}

.btn-sm {
  font-size: 0.85rem;
}

/* .d-flex, .justify-content-between removed — use Bootstrap 5 utilities */
/* Ajuste para ancho mínimo del dropdown de resumen */
#resumenDropdown {
  min-width: 200px;
}

/* Ticket-style modal */
.ticket {
  font-family: monospace;
  padding: 1rem;
  background-color: #fff;
  border-radius: 4px;
}
.ticket-item {
  padding: 0.25rem 0;
}
.ticket-item + .ticket-item {
  border-top: 1px dashed #ccc;
}
.ticket-total {
  border-top: 2px solid #000;
  font-weight: bold;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
}

/* Taqueros: Distinct badge & button styles */
.list-group-flush .badge {
  font-size: 0.75rem;
  vertical-align: middle;
}
.btn-listo {
  background-color: var(--color-accent);
  color: white;
  border: none;
}
.btn-listo:hover {
  background-color: #3e6329;
}
.producto-listo {
  background-color: #f0f0f0;
  color: #6c757d;
}

/* Detalle de Orden: Amazon-style resumen */
#resumenDropdown.resumen-amazon {
  min-width: 250px;
}
.resumen-item {
  padding: 0.5rem;
  border-bottom: 1px solid #e0e0e0;
}
.resumen-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}
.resumen-cantidad {
  background-color: var(--color-primary);
}
.resumen-remove {
  border: none;
  background: transparent;
  font-size: 1.2rem;
  line-height: 1;
}


/*====================================
  Login Page Logo Responsiveness
====================================*/
.logo-login {
  max-height: 200px;
  width: auto;
  height: auto;
}

@media (max-width: 576px) {
  .logo-login {
    max-height: 100px;
  }
}

/*====================================
  Feedback Animations (Sprint 5 — 5.3)
====================================*/
/* Bounce animation for product cards on add */
@keyframes bounceIn {
  0%   { transform: scale(1); }
  30%  { transform: scale(1.12); }
  50%  { transform: scale(0.95); }
  70%  { transform: scale(1.05); }
  100% { transform: scale(1); }
}
.animate-bounce {
  animation: bounceIn 0.45s ease;
}

/* Pulse animation for badges */
@keyframes badgePop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}
.animate-badge-pop {
  animation: badgePop 0.35s ease;
}

/* Check mark animation for payment success */
@keyframes checkMark {
  0%   { transform: scale(0) rotate(-45deg); opacity: 0; }
  50%  { transform: scale(1.2) rotate(0deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
.animate-check {
  animation: checkMark 0.5s ease forwards;
  display: inline-block;
}

/* Skeleton loading placeholders */
@keyframes shimmer {
  0%   { background-position: -200px 0; }
  100% { background-position: calc(200px + 100%) 0; }
}
.skeleton {
  background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
  background-size: 200px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}
.skeleton-text {
  height: 1em;
  margin-bottom: 0.5rem;
  width: 80%;
}
.skeleton-text-sm {
  height: 0.75em;
  width: 60%;
}
.skeleton-card {
  height: 120px;
  width: 100%;
}
.skeleton-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

/* Toast enhancements */
#toast-container {
  max-width: 360px;
}
#toast-container .toast {
  margin-bottom: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Slide-in animation for toasts */
@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
#toast-container .toast {
  animation: slideInRight 0.3s ease;
}

/* Confetti pulse for payment success */
@keyframes confettiPulse {
  0%   { box-shadow: 0 0 0 0 rgba(80,124,54,0.4); }
  70%  { box-shadow: 0 0 0 12px rgba(80,124,54,0); }
  100% { box-shadow: 0 0 0 0 rgba(80,124,54,0); }
}
.toast-confetti {
  animation: confettiPulse 0.6s ease;
}

/* ── Reduced motion — disable all feedback animations ── */
@media (prefers-reduced-motion: reduce) {
  .animate-bounce,
  .animate-badge-pop,
  .animate-check,
  .skeleton,
  #toast-container .toast,
  .toast-confetti {
    animation: none !important;
  }
  .product-card {
    transition: none !important;
  }
}