/* Custom CSS to support fine-grained visuals, custom animations, and layout patches */

/* Custom smooth scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #020617; /* slate-950 */
}

::-webkit-scrollbar-thumb {
  background: #1e293b; /* slate-800 */
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #0891b2; /* cyan-600 */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Keyframe animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.animate-slideUp {
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-fadeIn {
  animation: fadeIn 0.2s ease-out forwards;
}

.animate-shake {
  animation: shake 0.2s ease-in-out 2;
}

/* Custom categories button styling */
.category-btn {
  background-color: rgba(30, 41, 59, 0.4);
  border: 1px solid rgba(51, 65, 85, 0.3);
  color: #94a3b8; /* slate-400 */
}

.category-btn:hover {
  background-color: rgba(30, 41, 59, 0.8);
  color: #e2e8f0; /* slate-200 */
}

.category-btn.active {
  background: linear-gradient(135deg, #06b6d4, #2563eb); /* cyan-500 to blue-600 */
  color: #ffffff;
  font-weight: 600;
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.15);
}

/* Radial gradient glow for placeholders */
.bg-gradient-radial {
  background-image: radial-gradient(circle, var(--tw-gradient-stops));
}

/* Active card transition */
.product-card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(148, 163, 184, 0.3);
}

/* Calendar days */
.calendar-day-btn {
  transition: all 0.2s ease-in-out;
}

.calendar-day-btn:hover:not(:disabled) {
  background-color: rgba(6, 182, 212, 0.15);
  border-color: rgba(6, 182, 212, 0.4);
  color: #22d3ee;
}

.calendar-day-btn.active {
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 4px 10px rgba(6, 182, 212, 0.25);
}

/* Time slot buttons */
.time-slot-btn {
  transition: all 0.2s ease-in-out;
}

.time-slot-btn:hover:not(:disabled) {
  background-color: rgba(6, 182, 212, 0.1);
  border-color: rgba(6, 182, 212, 0.3);
  color: #22d3ee;
}

.time-slot-btn.active {
  background-color: rgba(6, 182, 212, 0.2);
  color: #22d3ee;
  border-color: #06b6d4;
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.15);
}

/* Tab buttons for Reorder modal */
.modal-tab-btn {
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.modal-tab-btn.active {
  border-color: #06b6d4;
  color: #22d3ee;
  font-weight: 600;
}

/* Seller active styling */
.vendor-active-border {
  border-color: rgba(245, 158, 11, 0.4) !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.1) !important;
}

.vendor-text {
  color: #f59e0b !important;
}

/* ==========================================================================
   MODO CLARO (LIGHT THEME OVERRIDES)
   ========================================================================== */
body.light-theme {
  background-color: #f8fafc !important; /* slate-50 */
  color: #1e293b !important; /* slate-800 */
}

/* Contenedores Principales, Header y Modales */
body.light-theme header,
body.light-theme .bg-slate-900,
body.light-theme .bg-slate-900\/95,
body.light-theme .bg-slate-900\/60,
body.light-theme .bg-slate-900\/80,
body.light-theme #detail-modal > div:last-child,
body.light-theme #success-modal > div:last-child,
body.light-theme #client-registration-modal > div:last-child,
body.light-theme #reservation-modal > div:last-child,
body.light-theme #stamp-modal > div:last-child,
body.light-theme #cartridge-modal > div:last-child,
body.light-theme #order-history-modal > div:last-child,
body.light-theme #vendor-login-modal > div:last-child,
body.light-theme #apply-vendor-modal > div:last-child {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-color: #e2e8f0 !important;
}

/* Modales e Interfaces especiales */
body.light-theme #vendor-panel-modal {
  background-color: #f8fafc !important;
}
body.light-theme #vendor-panel-modal .w-full.min-h-screen {
  background-color: #f8fafc !important;
}

/* Fondo de Slate Oscuro a Slate Claro */
body.light-theme .bg-slate-950,
body.light-theme .bg-slate-950\/80,
body.light-theme .bg-slate-950\/65,
body.light-theme .bg-slate-950\/60,
body.light-theme .bg-slate-950\/45,
body.light-theme .bg-slate-950\/40,
body.light-theme .bg-slate-950\/20,
body.light-theme .bg-slate-950\/50,
body.light-theme .bg-slate-850\/40,
body.light-theme .bg-slate-850 {
  background-color: #f1f5f9 !important; /* slate-100 */
  color: #334155 !important; /* slate-700 */
  border-color: #cbd5e1 !important; /* slate-300 */
}

/* Detalle de Tarjetas del Catálogo */
body.light-theme .product-card-hover {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
}
body.light-theme .product-card-hover:hover {
  border-color: #cbd5e1 !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04) !important;
}

/* Botones genéricos de fondo oscuro */
body.light-theme .bg-slate-950:not(#cart-count) {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
body.light-theme .bg-slate-950:not(#cart-count):hover {
  background-color: #cbd5e1 !important;
}

/* Bordes en general */
body.light-theme .border-slate-800,
body.light-theme .border-slate-800\/80,
body.light-theme .border-slate-800\/60,
body.light-theme .border-slate-850,
body.light-theme .border-slate-900,
body.light-theme .border-slate-700,
body.light-theme .border-b,
body.light-theme .border-t,
body.light-theme .divide-slate-800\/60,
body.light-theme .divide-slate-800 {
  border-color: #e2e8f0 !important; /* slate-200 */
}

/* Textos */
body.light-theme .text-white,
body.light-theme .text-slate-100,
body.light-theme .text-slate-200 {
  color: #0f172a !important; /* slate-900 */
}

body.light-theme .text-slate-300,
body.light-theme .text-slate-400,
body.light-theme .text-slate-250 {
  color: #334155 !important; /* slate-700 */
}

body.light-theme .text-slate-500,
body.light-theme .text-slate-600 {
  color: #64748b !important; /* slate-500 */
}

body.light-theme .text-slate-450 {
  color: #475569 !important;
}

/* Textos de Color Re-mapeados para Contraste */
body.light-theme .text-cyan-400 {
  color: #0284c7 !important; /* sky-600 */
}
body.light-theme .text-cyan-300 {
  color: #0369a1 !important; /* sky-700 */
}
body.light-theme .text-amber-400 {
  color: #d97706 !important; /* amber-600 */
}
body.light-theme .text-emerald-400 {
  color: #16a34a !important; /* emerald-600 */
}
body.light-theme .text-emerald-450 {
  color: #15803d !important; /* emerald-700 */
}
body.light-theme .text-purple-400 {
  color: #7c3aed !important; /* violet-600 */
}
body.light-theme .text-rose-450,
body.light-theme .text-red-400 {
  color: #dc2626 !important; /* red-600 */
}

/* Inputs, Selects y Formularios */
body.light-theme input[type="text"],
body.light-theme input[type="number"],
body.light-theme input[type="tel"],
body.light-theme input[type="password"],
body.light-theme select,
body.light-theme textarea {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
body.light-theme input::placeholder {
  color: #94a3b8 !important;
}

/* Carrito y Vistas Laterales */
body.light-theme aside {
  background-color: #ffffff !important;
  border-color: #e2e8f0 !important;
}

/* Botones de Categorías */
body.light-theme .category-btn:not(.active) {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
}
body.light-theme .category-btn:not(.active):hover {
  background-color: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Scrollbars en Modo Claro */
body.light-theme ::-webkit-scrollbar-track {
  background: #f1f5f9;
}
body.light-theme ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}
body.light-theme ::-webkit-scrollbar-thumb:hover {
  background: #0284c7;
}

