/* Estilos personalizados para Tu Casa - Distribución B2B & Ferreterías */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

body {
  font-family: var(--font-primary);
  background-color: #f8fafc;
  color: #1e293b;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Transiciones suaves entre vistas */
.tab-content {
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toast container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  animation: slideInRight 0.3s ease-out forwards;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Stepper de Pedidos B2B */
.step-line {
  position: absolute;
  top: 1rem;
  left: 20%;
  right: 20%;
  height: 2px;
  background-color: #e2e8f0;
  z-index: 0;
}

/* ===================================================
   REGLAS DE IMPRESIÓN (Factura Electrónica B2B A4)
   =================================================== */
@media print {
  body * {
    visibility: hidden;
  }

  #b2b-invoice-paper, #b2b-invoice-paper * {
    visibility: visible;
  }

  #modal-b2b-invoice {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #fff !important;
    display: block !important;
  }

  #b2b-invoice-paper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100% !important;
    max-width: 210mm !important;
    margin: 0 auto;
    padding: 10mm !important;
    box-shadow: none !important;
    border: none !important;
  }

  .no-print {
    display: none !important;
  }

  @page {
    margin: 10mm;
    size: A4 portrait;
  }
}
