/* =========================================================
   GENERADOR DE NOTA DE VENTA - LINA POS
   ========================================================= */

:root {
  --nota-primary: #0d6efd;
  --nota-primary-dark: #0e16d4;
  --nota-dark: #081028;
  --nota-dark-2: #0f1f4d;
  --nota-text: #1d2939;
  --nota-muted: #667085;
  --nota-border: #e7eaf0;
  --nota-light: #f8f9fc;
  --nota-blue-light: #eef4ff;
}

/* =========================================================
   HERO
   ========================================================= */

.nota-hero {
  padding: 100px 0 90px;
  color: white;
  background: linear-gradient(135deg, #081028, #0f1f4d, #1b35b8);
  overflow: hidden;
}

.nota-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px;
  margin-bottom: 18px;
  background: var(--nota-blue-light);
  color: var(--nota-primary);
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nota-hero h1 {
  max-width: 650px;
  margin: 0 0 22px;
  font-size: 3.3rem;
  line-height: 1.08;
  font-weight: 800;
}

.nota-hero h1 span {
  color: #7db3ff;
}

.nota-hero p {
  max-width: 600px;
  margin: 0 0 28px;
  color: #d6d8db;
  font-size: 1.1rem;
  line-height: 1.7;
}

.nota-hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.nota-hero-points div {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #fff;
  font-size: 0.9rem;
}

.nota-hero-points i {
  color: #75aaff;
}

/* =========================================================
   TICKET HERO
   ========================================================= */

.nota-hero-ticket {
  width: 280px;
  margin: 0 auto;
  padding: 25px 20px;
  color: #111;
  background: #fff;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.35);
  transform: rotate(1deg);
  font-family: "Courier New", monospace;
}

.ticket-logo {
  text-align: center;
  margin-bottom: 8px;
}

.ticket-logo img {
  width: 100px;
  max-width: 100%;
}

.ticket-business {
  text-align: center;
  font-size: 15px;
  font-weight: bold;
}

.ticket-small {
  margin-top: 5px;
  text-align: center;
  font-size: 9px;
  line-height: 1.5;
}

.ticket-line,
.ticket-divider {
  border-top: 1px dashed #777;
  margin: 12px 0;
}

.ticket-product {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 9px;
}

.ticket-total {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.ticket-thanks {
  margin-top: 20px;
  text-align: center;
  font-size: 10px;
  font-weight: bold;
}

.ticket-powered {
  margin-top: 10px;
  text-align: center;
  font-size: 7px;
  color: #777;
}

/* =========================================================
   GENERADOR
   ========================================================= */

.nota-generator {
  padding: 90px 0;
  background: #f8f9fc;
}

.nota-section-heading {
  max-width: 760px;
  margin: 0 auto 50px;
  text-align: center;
}

.nota-section-heading h2 {
  margin: 0 0 18px;
  color: var(--nota-text);
  font-size: 2.5rem;
  font-weight: 800;
}

.nota-section-heading p {
  max-width: 680px;
  margin: 0 auto;
  color: var(--nota-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* =========================================================
   CARD
   ========================================================= */

.nota-card {
  margin-bottom: 22px;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--nota-border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.05);
}

.nota-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.nota-card-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--nota-primary);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nota-card-header h3 {
  margin: 0;
  color: var(--nota-text);
  font-size: 1.2rem;
  font-weight: 750;
}

.nota-card-icon {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 13px;
  background: var(--nota-blue-light);
  color: var(--nota-primary);
}

/* =========================================================
   FORMULARIOS
   ========================================================= */

.nota-form-group {
  margin-bottom: 18px;
}

.nota-form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--nota-text);
  font-size: 0.85rem;
  font-weight: 700;
}

.nota-form-group label small {
  color: var(--nota-muted);
  font-weight: 400;
}

.nota-input,
.nota-textarea,
.producto-row input {
  height: 44px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  color: var(--nota-text);
  font-size: 0.9rem;
  box-shadow: none !important;
}

.nota-textarea {
  height: auto;
  min-height: 100px;
  resize: vertical;
}

.nota-input:focus,
.nota-textarea:focus,
.producto-row input:focus {
  border-color: var(--nota-primary);
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1) !important;
}

.nota-help {
  display: block;
  margin-top: 7px;
  color: #98a2b3;
}

/* =========================================================
   PRODUCTOS
   ========================================================= */

.producto-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 75px 110px 100px 38px;
  gap: 10px;
  align-items: end;
  padding: 17px;
  margin-bottom: 12px;
  background: #f8f9fc;
  border: 1px solid #edf0f5;
  border-radius: 12px;
}

.producto-row label {
  display: block;
  margin-bottom: 6px;
  color: var(--nota-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.producto-subtotal-value {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--nota-text);
  font-size: 0.88rem;
  font-weight: 700;
}

.btn-eliminar-producto {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: #fff;
  color: #dc3545;
  cursor: pointer;
}

.btn-eliminar-producto:hover {
  background: #fff0f1;
}

.btn-agregar-producto {
  width: 100%;
  min-height: 45px;
  border: 1px dashed #b7c7e8;
  border-radius: 10px;
  background: var(--nota-blue-light);
  color: var(--nota-primary);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-agregar-producto:hover {
  background: #e3edff;
}

/* =========================================================
   TOTAL
   ========================================================= */

.nota-total-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #081028;
  color: #fff;
}

.nota-total-box span {
  font-size: 0.9rem;
  font-weight: 600;
}

.nota-total-box strong {
  font-size: 1.45rem;
}

/* =========================================================
   ACCIONES
   ========================================================= */

.nota-actions {
  display: flex;
  gap: 12px;
  margin-top: 25px;
}

.nota-actions .btn {
  border-radius: 10px;
  font-weight: 700;
}

/* =========================================================
   PREVIEW
   ========================================================= */

.nota-preview-sticky {
  position: sticky;
  top: 90px;
  padding: 25px;
  background: #fff;
  border: 1px solid var(--nota-border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.05);
}

.nota-preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.nota-preview-heading span {
  color: var(--nota-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.nota-preview-heading h3 {
  margin: 3px 0 0;
  color: var(--nota-text);
  font-size: 1.25rem;
  font-weight: 800;
}

.nota-live {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border-radius: 30px;
  background: #f0fdf4;
  color: #15803d !important;
  font-size: 0.7rem !important;
  letter-spacing: 0 !important;
}

.nota-live span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
}

/* =========================================================
   TICKET PREVIEW
   ========================================================= */

.ticket-preview-wrapper {
  display: flex;
  justify-content: center;
  padding: 25px;
  background: #eef0f4;
  border-radius: 12px;
}

.ticket-preview {
  width: 48mm;
  min-height: 180mm;
  padding: 6mm 3mm;
  color: #111;
  background: #fff;
  font-family: "Courier New", monospace;
  font-size: 9px;
  line-height: 1.35;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ticket-logo-preview {
  text-align: center;
  margin-bottom: 5px;
}

.ticket-logo-preview img {
  width: 80px;
  max-width: 100%;
}

.ticket-business-preview {
  text-align: center;
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
}

.ticket-info-preview {
  text-align: center;
  margin-top: 3px;
  font-size: 8px;
  word-break: break-word;
}

.ticket-divider {
  margin: 10px 0;
  border-top: 1px dashed #555;
}

.ticket-columns {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 7px;
  font-weight: bold;
}

.ticket-product-preview {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  margin-top: 7px;
  font-size: 8px;
}

.ticket-product-preview .product-info {
  flex: 1;
  min-width: 0;
}

.ticket-product-preview .product-total {
  white-space: nowrap;
  text-align: right;
}

.ticket-total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: bold;
}

.ticket-total-preview strong {
  font-size: 14px;
}

.ticket-message-preview {
  margin-top: 20px;
  text-align: center;
  font-size: 8px;
  white-space: pre-line;
}

.ticket-powered-preview {
  margin-top: 14px;
  text-align: center;
  color: #777;
  font-size: 6.5px;
}
/* =========================================================
   MARCA DE AGUA - VISTA PREVIA
   ========================================================= */

.ticket-preview {
  position: relative;
  overflow: hidden;
}

/* Capa completa de marca de agua */
.ticket-watermark-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;

  overflow: hidden;

  pointer-events: none;

  z-index: 0;
}

/* Cada marca */
.ticket-watermark-item {
  position: absolute;

  width: 250px;

  color: rgba(190, 190, 190, 0.45);

  font-family: "Courier New", monospace;

  font-size: 7px;
  font-weight: bold;

  line-height: 1;

  white-space: nowrap;

  transform: rotate(-45deg);

  transform-origin: center;

  pointer-events: none;
}

/* Todo el contenido del ticket queda encima */
.ticket-preview > *:not(.ticket-watermark-layer) {
  position: relative;
  z-index: 1;
}
/* =========================================================
   BOTONES PREVIEW
   ========================================================= */

.preview-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 18px;
}

.preview-actions .btn {
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 700;
}

.preview-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  color: #667085;
  font-size: 0.75rem;
  line-height: 1.5;
}

.preview-note i {
  margin-top: 2px;
  color: var(--nota-primary);
}

/* =========================================================
   COMO FUNCIONA
   ========================================================= */

.nota-how {
  padding: 90px 0;
  background: #fff;
}

.nota-how-card {
  height: 100%;
  padding: 35px 30px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--nota-border);
  border-radius: 18px;
  box-shadow: 0 8px 30px rgba(16, 24, 40, 0.05);
  transition: 0.25s ease;
}

.nota-how-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 45px rgba(16, 24, 40, 0.09);
}

.nota-how-number {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: var(--nota-blue-light);
  color: var(--nota-primary);
  font-size: 1.3rem;
  font-weight: 800;
}

.nota-how-card h3 {
  margin: 0 0 12px;
  color: var(--nota-text);
  font-size: 1.15rem;
  font-weight: 750;
}

.nota-how-card p {
  margin: 0;
  color: var(--nota-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

/* =========================================================
   CTA
   ========================================================= */

.nota-cta {
  padding: 90px 0;
  color: #fff;
  background: linear-gradient(135deg, #081028, #0f1f4d);
}

.nota-cta h2 {
  max-width: 750px;
  margin: 0 auto 18px;
  font-size: 2.5rem;
  font-weight: 800;
}

.nota-cta p {
  max-width: 650px;
  margin: 0 auto 28px;
  color: #d6d8db;
  line-height: 1.7;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 991px) {
  .nota-hero {
    padding: 75px 0;
  }

  .nota-hero h1 {
    font-size: 2.6rem;
  }

  .nota-hero-ticket {
    margin-top: 55px;
  }

  .nota-preview-sticky {
    position: static;
    margin-top: 20px;
  }

  .producto-row {
    grid-template-columns: 1fr 80px 110px;
  }

  .producto-subtotal {
    grid-column: 2 / 4;
  }

  .btn-eliminar-producto {
    position: absolute;
    top: 12px;
    right: 12px;
  }
}

@media (max-width: 767px) {
  .nota-hero {
    padding: 60px 0;
  }

  .nota-hero h1 {
    font-size: 2.1rem;
  }

  .nota-hero p {
    font-size: 0.98rem;
  }

  .nota-hero-points {
    flex-direction: column;
    gap: 10px;
  }

  .nota-hero-ticket {
    width: 250px;
  }

  .nota-generator,
  .nota-how,
  .nota-cta {
    padding-top: 65px;
    padding-bottom: 65px;
  }

  .nota-section-heading h2 {
    font-size: 1.9rem;
  }

  .nota-card {
    padding: 23px 18px;
  }

  .producto-row {
    grid-template-columns: 1fr 75px;
    gap: 9px;
    padding: 15px;
  }

  .producto-description {
    grid-column: 1 / 3;
  }

  .producto-precio {
    grid-column: 1;
  }

  .producto-subtotal {
    grid-column: 2;
  }

  .producto-subtotal-value {
    justify-content: flex-start;
  }

  .btn-eliminar-producto {
    top: 8px;
    right: 8px;
    width: 34px;
    height: 34px;
  }

  .nota-actions {
    flex-direction: column;
  }

  .nota-actions .btn {
    width: 100%;
  }

  .ticket-preview-wrapper {
    padding: 18px;
  }

  .preview-actions {
    grid-template-columns: 1fr;
  }

  .nota-cta h2 {
    font-size: 1.9rem;
  }
}

.cta-badge {
  display: inline-block;
  padding: 8px 18px;
  margin-bottom: 20px;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1px;
}
