/* Boarding pass — diseño 1220×330, escala proporcional en móvil */

.boarding-passes-list {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-bottom: 0.5rem;
}

.boarding-pass-scaler {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  display: flex;
  justify-content: center;
  overflow: hidden;
  padding: 0.25rem 0;
}

.boarding-pass-fit {
  width: 100%;
  max-width: 1220px;
  margin-inline: auto;
  aspect-ratio: 1220 / 330;
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  animation: confirmIn 0.7s ease forwards;
}

@supports (width: 100cqw) {
  .boarding-pass-fit {
    aspect-ratio: auto;
    height: calc(100cqw * 330 / 1220);
  }
}

.boarding-pass {
  --bp-w: 1220px;
  --bp-h: 330px;
  --bp-text: #e49a94;
  --bp-blush: #ffdad6;
  --bp-cream: #faf9f6;
  --bp-border: #cccdcf;
  --bp-qr-border: #f4bbb6;

  width: var(--bp-w);
  height: var(--bp-h);
  position: absolute;
  top: 0;
  left: 50%;
  margin-inline: 0;
  background: var(--bp-cream);
  overflow: visible;
  transform: translateX(-50%) scale(calc(min(100cqw, 1220px) / 1220px));
  transform-origin: top center;
}

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

/* Réplica 1:1 para export PNG — sin escala ni offset de pantalla */
.boarding-pass.boarding-pass--export,
.boarding-pass-fit.boarding-pass-fit--export {
  animation: none !important;
  opacity: 1 !important;
}

.boarding-pass.boarding-pass--export {
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
  width: 1220px !important;
  height: 330px !important;
  margin: 0 !important;
  overflow: hidden !important;
}

.boarding-pass--export .bp-img {
  transform: none !important;
}

/* Formas */
.bp-shape {
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.bp-header-bar {
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--bp-h) - 270px);
  background: var(--bp-blush);
}

.bp-vline {
  top: 0px;
  bottom: 0;
  border-left: 1px dashed var(--bp-border);
  z-index: 1;
}

.bp-vline--1 {
  left: 117px;
}

.bp-vline--2 {
  left: 1000px;
}

/* Tipografía base */
.bp-text {
  position: absolute;
  margin: 0;
  padding: 0;
  z-index: 2;
  color: var(--bp-text);
  white-space: pre-wrap;
}

.bp-text--baskerville {
  font-family: "Libre Baskerville", Georgia, serif;
  font-weight: 400;
  text-transform: uppercase;
}

.bp-text--ubuntu {
  font-family: "Ubuntu", system-ui, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Textos — coords Canva */
.bp-text--header-main {
  top: 12.98px;
  left: 129.73px;
  width: 427.76px;
  height: 27px;
  font-size: 18.67px;
  letter-spacing: 0.154em;
  text-align: center;
  line-height: 1.4;
}

.bp-text--header-right {
  top: 16.44px;
  left: 1032px;
  width: 153.16px;
  height: 29.33px;
  font-size: 17px;
  letter-spacing: 0.1em;
  text-align: center;
  line-height: 1.1;
}

.bp-text--subtitle {
  top: 73.16px;
  left: 132.73px;
  width: 493.01px;
  height: 40.44px;
  font-size: 17px;
  letter-spacing: 0.1em;
  text-align: left;
  line-height: 1.1;
}

.bp-text--name {
  top: 125px;
  left: 235px;
  width: 267.87px;
  height: 39.33px;
  font-family: "Brittany", cursive;
  font-size: 45px;
  font-weight: 400;
  text-transform: none;
  text-align: center;
  line-height: 1.1;
  letter-spacing: 0;
}

/* Stub — dos elementos separados, rot -90° (Canva leading 110%) */
.bp-text--stub-name {
  top: 192px;
  left: -75px;
  width: 215.78px;
  height: 17.47px;
  font-family: "Libre Baskerville", Georgia, serif;
  font-style: italic;
  font-size: 19px;
  font-weight: 400;
  font-synthesis: none;
  text-transform: none;
  text-align: center;
  line-height: 1.1;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  white-space: nowrap;
}

.bp-text--stub-date {
  top: 180px;
  left: -30px;
  width: 215.78px;
  height: 14.2px;
  font-family: "Ubuntu", system-ui, sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.1;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  white-space: nowrap;
}

/* Campos rich-text — un bloque con salto de línea como Canva */
.bp-text--field {
  font-family: "Ubuntu", system-ui, sans-serif;
  font-size: 18px;
  font-weight: unset;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.1;
  white-space: pre-line;
  overflow: visible;
}

.bp-text--origen {
  top: 210.6px;
  left: 170px;
  width: 245.28px;
  height: 26.31px;
}

.bp-text--destino {
  top: 260.29px;
  left: 170px;
  width: 245.28px;
  height: 26.31px;
}

.bp-text--vuelo {
  top: 260px;
  left: 654px;
  width: 170.49px;
  height: 60.31px;
  text-align: left;
}

/* Imágenes Canva */
.bp-img {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.bp-img--barcode {
  top: 118.51px;
  left: 828px;
  width: 190px;
  height: 130px;
  object-fit: contain;
  transform: rotate(90deg);
  transform-origin: center center;
}

.bp-img--heart {
  top: 114.95px;
  left: 676.6px;
  width: 63.6px;
  height: 124px;
  object-fit: contain;
}

/* QR */
.bp-qr-wrap {
  position: absolute;
  top: 106px;
  left: 1037px;
  width: 160px;
  height: 160px;
  border: 2px solid var(--bp-qr-border);
  background: #fff;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.bp-qrcode,
#bp-qrcode {
  display: block;
  width: 130px;
  height: 130px;
}

.bp-text--url {
  top: 287px;
  left: 1036px;
  width: 155.32px;
  height: 9.07px;
  font-family: "Ubuntu", system-ui, sans-serif;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
  word-break: break-all;
}

@media (max-width: 900px) {
  .boarding-pass-scaler {
    padding-bottom: 0.25rem;
  }
}
