/* ==========================================================================
   AKAPAGO — Comprobante tipo ticket (todos los tipos de recibo).
   Lo arma ComprobanteTemplateService.construirTicket con los mismos datos.
   El HTML original (.akp-ticket-src) queda oculto: de él salen WhatsApp y la
   impresión térmica.
   ========================================================================== */
.akp-ticket-src {
  display: none !important;
}

#id_cont_comprobante.comprobante-container {
  display: block !important;
  height: auto !important;
  max-height: none !important;
  padding: 0.75rem 0.5rem 1.25rem !important;
  background: #f3f6f7;
}

.akp-ticket {
  position: relative;
  flex: none;
  height: auto;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 10px;
  background: #fff;
  color: #14262f;
  font-family: "Plus Jakarta Sans", var(--akapago-font, "DM Sans"), Arial, sans-serif;
  box-shadow: 0 8px 24px rgba(9, 30, 40, 0.1);
}

/* Borde inferior dentado de ticket */
.akp-ticket::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 10px;
  background: radial-gradient(circle at 10px 0, transparent 8px, #fff 9px) -2px 0 / 20px 10px repeat-x;
}

/* Cabecera compacta (2026-11): marca + título en una línea, sin ícono de check; total en una fila. */
.akp-ticket__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 1rem 0.55rem;
  border-bottom: 1px dashed #cfdde0;
}

.akp-ticket__brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 0.35rem;
  color: #0b3433;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.akp-ticket__brand img {
  width: 18px;
  height: 18px;
}

.akp-ticket__brand b {
  color: #65a30d;
}

.akp-ticket__head-txt {
  min-width: 0;
  text-align: right;
  line-height: 1.2;
}

.akp-ticket__status {
  color: #0f6e56;
  font-size: 0.8rem;
  font-weight: 700;
  word-break: break-word;
}

.akp-ticket__sub {
  color: #5a7080;
  font-size: 0.72rem;
  font-weight: 600;
}

.akp-ticket__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 1rem;
  border-bottom: 1px dashed #cfdde0;
}

.akp-ticket__total > span {
  color: #5a7080;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.akp-ticket__total > b {
  color: #0b3433;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.akp-ticket__body {
  padding: 0.35rem 1rem 0.3rem;
}

/* Filas en rejilla: etiqueta al margen izquierdo | valor al margen derecho (mismo borde que el
   total). El botón copiar va pegado a la IZQUIERDA del valor, así no corre el margen. */
.akp-ticket__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 0.6rem;
  padding: 0.2rem 0;
  line-height: 1.3;
}

.akp-ticket__row > span {
  color: #6b7f8c;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.akp-ticket__row > b {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.2rem;
  min-width: 0;
  color: #14262f;
  font-size: 0.82rem;
  font-weight: 700;
  text-align: right;
  word-break: break-word;
}

.akp-ticket__row--full {
  grid-template-columns: minmax(0, 1fr);
}

.akp-ticket__row--full > b {
  justify-content: center;
  text-align: center;
}

/* Notas del proveedor («GRACIAS POR SU PAGO»…) */
.akp-ticket__row--note > b {
  margin-top: 0.15rem;
  color: #5a7080;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Textos largos (Mensaje, Recomendación, URLs): etiqueta arriba, texto a todo el ancho */
.akp-ticket__row--block {
  grid-template-columns: minmax(0, 1fr);
}

.akp-ticket__row--block > b {
  justify-content: flex-start;
  color: #34495e;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
}

.akp-ticket__row--block > b > .akp-ticket__code {
  color: #14262f;
}

.akp-ticket__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.akp-ticket__copy {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 18px;
  margin: -2px 0;
  align-self: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #117a7a;
  font-size: 0.8rem;
  cursor: pointer;
}

.akp-ticket__copy:hover {
  background: #e3f4f1;
}

.akp-ticket__section {
  margin: 0.35rem 0 0.1rem;
  padding-top: 0.3rem;
  border-top: 1px dashed #cfdde0;
  color: #117a7a;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Recibos del proveedor (líneas de texto) */
.akp-ticket__body--lines {
  padding-top: 0.45rem;
}

.akp-ticket__line {
  padding: 0.05rem 0;
  color: #14262f;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.76rem;
  line-height: 1.3;
  text-align: center;
  white-space: pre-wrap;
  word-break: break-word;
}

.akp-ticket__foot {
  padding: 0.4rem 1rem 0.7rem;
  border-top: 1px dashed #cfdde0;
  color: #7a8b97;
  font-size: 0.66rem;
  text-align: center;
}

@media print {
  .akp-ticket__copy {
    display: none !important;
  }

  .akp-ticket__row--screen {
    display: none !important;
  }
}

/* Mismo ticket en web, móvil e impresión: ancho fijo de papel (80 mm ≈ 380px) */
.akp-ticket {
  max-width: 380px;
}

/* Pie del comprobante con los colores de la marca:
   [Omitir] [Imprimir] secundarios · [Compartir] principal */
.alertify .ajs-dialog.akapago-modal-comprobante.akp-modal-std.akp-modal-std .ajs-footer .ajs-button {
  border: 1px solid #cfdde0 !important;
  background: #fff !important;
  color: #34495e !important;
}

.alertify .ajs-dialog.akapago-modal-comprobante.akp-modal-std.akp-modal-std .ajs-footer .ajs-button.akapago-btn-success {
  border-color: #117a7a !important;
  background: #117a7a !important;
  color: #fff !important;
}

.alertify .ajs-dialog.akapago-modal-comprobante.akp-modal-std.akp-modal-std .ajs-footer .ajs-button:not(.akapago-btn-success):hover {
  border-color: #117a7a !important;
  color: #0b3433 !important;
}

/* La hoja del comprobante se desplaza completa (el ticket nunca se recorta) */
.alertify .ajs-dialog.akapago-modal-comprobante .ajs-content {
  height: auto !important;
}
