:root {
  --mw-gold: #f5c542;
  --mw-gold2: #b98512;
  --mw-red: #a70017;
  --mw-black: #080808;
  --mw-panel: #121212;
  --mw-muted: #d8c9a1;
}
.macworld-customer-tickets {
  margin: 50px 0;
}
.macworld-ticket-section-heading {
  text-align: center;
  margin-bottom: 24px;
}
.macworld-ticket-section-heading .macworld-crown {
  display: block;
  color: var(--mw-gold);
  font-size: 34px;
}
.macworld-ticket-section-heading h2 {
  margin: 4px 0 0;
}
.macworld-ticket-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
  gap: 28px;
  justify-content: center;
}
.macworld-ticket-card,
.macworld-pass {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(167, 0, 23, 0.62), transparent 38%),
    linear-gradient(145deg, #18110a, #050505 58%, #160006);
  border: 2px solid var(--mw-gold2);
  border-radius: 20px;
  padding: 26px 24px;
  color: #fff;
  text-align: center;
  box-shadow:
    0 20px 48px rgba(0, 0, 0, 0.28),
    inset 0 0 0 2px rgba(245, 197, 66, 0.14);
}
.macworld-ticket-card:before,
.macworld-pass:before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(245, 197, 66, 0.38);
  border-radius: 14px;
  pointer-events: none;
}
.macworld-ticket-brand,
.macworld-pass-brand {
  color: var(--mw-gold);
  font-weight: 800;
  letter-spacing: 2px;
  font-size: 18px;
}
.macworld-crown {
  color: var(--mw-gold);
  font-size: 22px;
}
.macworld-ticket-event,
.macworld-pass-event {
  margin-top: 14px;
  font-size: 26px;
  line-height: 1.05;
  font-weight: 900;
  text-transform: uppercase;
}
.macworld-ticket-pass,
.macworld-pass-category {
  margin-top: 6px;
  color: var(--mw-gold);
  font-size: 17px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.macworld-ticket-event-meta,
.macworld-pass-event-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 14px 0;
  color: var(--mw-muted);
  font-size: 13px;
}
.macworld-ticket-event-meta span + span:before,
.macworld-pass-event-meta span + span:before {
  content: "•";
  margin-right: 16px;
  color: var(--mw-gold);
}
.macworld-ticket-qr,
.macworld-pass-qr-wrap {
  display: inline-flex;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  margin: 10px auto 8px;
  box-shadow: 0 0 0 3px rgba(245, 197, 66, 0.45);
}
.macworld-ticket-qr img {
  width: 170px;
  height: 170px;
  object-fit: contain;
  display: block;
}
.macworld-pass-qr-wrap img {
  width: 240px;
  max-width: 68vw;
  height: auto;
  display: block;
}
.macworld-ticket-scan,
.macworld-pass-scan-label {
  display: table;
  margin: 3px auto 18px;
  background: linear-gradient(#ffe07a, #e5a51c);
  color: #341d00;
  border-radius: 999px;
  padding: 7px 24px;
  font-weight: 900;
  font-size: 12px;
  letter-spacing: 1px;
}
.macworld-ticket-meta,
.macworld-pass-details {
  display: grid;
  gap: 10px;
  text-align: left;
  margin-top: 16px;
}
.macworld-ticket-meta > div,
.macworld-pass-details > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.11);
  padding-top: 9px;
}
.macworld-ticket-meta span,
.macworld-pass-details span {
  color: var(--mw-muted);
  font-size: 12px;
}
.macworld-ticket-meta strong,
.macworld-pass-details strong {
  text-align: right;
  overflow-wrap: anywhere;
}
.macworld-ticket-print,
.macworld-pass-actions button {
  display: inline-block;
  margin-top: 20px;
  padding: 11px 18px;
  background: linear-gradient(#f8d05b, #bd8412);
  color: #231500 !important;
  border: 0;
  border-radius: 999px;
  text-decoration: none !important;
  font-weight: 800;
  cursor: pointer;
}
.macworld-ticket-card.status-refunded,
.macworld-ticket-card.status-cancelled,
.macworld-ticket-card.status-failed,
.macworld-ticket-card.status-blocked,
.macworld-pass.is-invalid {
  filter: saturate(0.7);
}
.macworld-ticket-card.status-refunded:after,
.macworld-ticket-card.status-cancelled:after,
.macworld-ticket-card.status-failed:after,
.macworld-ticket-card.status-blocked:after {
  content: "INVALID";
  position: absolute;
  top: 18px;
  right: -31px;
  background: #b00020;
  color: #fff;
  padding: 7px 38px;
  transform: rotate(36deg);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
}
.macworld-pass-page {
  max-width: 430px;
  margin: 42px auto;
  padding: 0 15px;
}
.macworld-pass-topline {
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1.2px;
  margin-bottom: 12px;
}
.macworld-pass-status {
  display: inline-block;
  margin-top: 18px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1px;
  background: #173f20;
  color: #70ff8b;
}
.macworld-pass.is-used .macworld-pass-status {
  background: #51350a;
  color: #ffd567;
}
.macworld-pass.is-invalid .macworld-pass-status {
  background: #580812;
  color: #ff808c;
}
.macworld-pass-terms {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  line-height: 1.5;
  color: #d7c9b1;
}
.macworld-pass-terms p {
  margin: 0;
}
.macworld-pass-footer {
  margin-top: 18px;
  color: var(--mw-gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
}
.macworld-pass-actions {
  text-align: center;
}
.macworld-pass-message {
  max-width: 520px;
  margin: 50px auto;
  padding: 20px;
  border: 1px solid #ddd;
  text-align: center;
}
@media (max-width: 767px) {
  .macworld-ticket-list {
    grid-template-columns: 1fr;
  }
  .macworld-ticket-card {
    max-width: 360px;
    margin: auto;
    width: 100%;
    box-sizing: border-box;
  }
  .macworld-ticket-event,
  .macworld-pass-event {
    font-size: 23px;
  }
}
@media print {

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

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        width: 100% !important;
        height: auto !important;
    }

    /*
     * Preserve pass colours in print/PDF.
     */
    *,
    *::before,
    *::after {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }


    /*
     * Hide WordPress/theme elements.
     */
    #wpadminbar,
    header,
    footer,
    nav,
    .site-header,
    .site-footer,
    #masthead,
    #colophon,
    .elementor-location-header,
    .elementor-location-footer,
    .elementor-sticky,
    .elementor-sticky--active,
    .sticky-header,
    .main-header,
    .header-wrapper,
    .footer-wrapper,
    .macworld-pass-actions {
        display: none !important;
    }


    /*
     * Remove theme wrappers/layout restrictions.
     */
    #page,
    #content,
    .site,
    .site-content,
    .content-area,
    .entry-content,
    main,
    article {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: none !important;
        min-height: 0 !important;
        background: transparent !important;
    }


    /*
     * Entire printable area.
     */
    .macworld-pass-page {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;

        display: flex !important;
        justify-content: center !important;
        align-items: flex-start !important;

        page-break-before: avoid !important;
        page-break-after: avoid !important;
        page-break-inside: avoid !important;

        break-before: avoid !important;
        break-after: avoid !important;
        break-inside: avoid !important;
    }


    /*
     * Actual ticket.
     *
     * Keep it small enough to guarantee one A4 page.
     */
    .macworld-pass {
        width: 105mm !important;
        max-width: 105mm !important;

        margin: 0 auto !important;
        padding: 7mm !important;

        box-sizing: border-box !important;

        page-break-inside: avoid !important;
        break-inside: avoid !important;

        overflow: hidden !important;

        position: relative !important;

        background: #0b0010 !important;
        color: #fff !important;

        border: 1px solid #d8a52b !important;
    }


    /*
     * QR must stay controlled in print.
     */
    .macworld-pass-qr {
        margin: 4mm auto !important;
        text-align: center !important;

        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .macworld-pass-qr img {
        display: block !important;

        width: 72mm !important;
        height: 72mm !important;

        max-width: 72mm !important;

        margin: 0 auto !important;

        object-fit: contain !important;
    }


    /*
     * Tighten typography for one-page output.
     */
    .macworld-pass h1 {
        margin: 2mm 0 !important;
        font-size: 16px !important;
        line-height: 1.2 !important;
    }

    .macworld-pass h2 {
        margin: 1.5mm 0 !important;
        font-size: 13px !important;
        line-height: 1.2 !important;
    }

    .macworld-pass p {
        margin: 1.5mm 0 !important;
        line-height: 1.35 !important;
    }


    .macworld-pass-status,
    .macworld-pass-details,
    .macworld-pass-terms {
        margin-top: 2mm !important;
        margin-bottom: 2mm !important;
    }


    /*
     * Make sure nothing inside the ticket
     * starts a second page.
     */
    .macworld-pass > * {
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }
}

/* =========================================================
 * MACWORLD POSTER PASS
 * The artwork is a real <img>, not a CSS background, so it
 * is included reliably when printing/saving as PDF.
 * ======================================================= */
.macworld-poster-pass-page {
    width: 100%;
    max-width: none;
    margin: 40px auto;
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.macworld-pass-poster {
    position: relative;
    width: min(100%, 512px);
    aspect-ratio: 2 / 3;
    margin: 0 auto;
    overflow: hidden;
    background: #050000;
    box-shadow: 0 18px 55px rgba(0, 0, 0, .35);
}

.macworld-pass-poster-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

/*
 * Live QR sits inside the blank gold QR frame in the artwork.
 * Keep the QR square and leave some of the artwork's cream/gold
 * border visible around it.
 */
.macworld-pass-poster-qr {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50.85%;
    width: 29.3%;
    aspect-ratio: 1 / 1;
    transform: translateX(-50%);
    overflow: hidden;
}

.macworld-pass-poster-qr img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: contain;
}

.macworld-poster-actions {
    margin: 0;
    text-align: center;
}

@media (max-width: 560px) {
    .macworld-poster-pass-page {
        margin: 20px auto;
        padding: 0 10px;
    }

    .macworld-pass-poster {
        width: 100%;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 0;
    }

    html,
    body {
        width: 210mm !important;
        height: 297mm !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
    }

    #wpadminbar,
    header,
    footer,
    nav,
    .site-header,
    .site-footer,
    #masthead,
    #colophon,
    .elementor-location-header,
    .elementor-location-footer,
    .elementor-sticky,
    .elementor-sticky--active,
    .sticky-header,
    .main-header,
    .header-wrapper,
    .footer-wrapper,
    .macworld-poster-actions {
        display: none !important;
    }

    #page,
    #content,
    .site,
    .site-content,
    .content-area,
    .entry-content,
    main,
    article {
        margin: 0 !important;
        padding: 0 !important;
        max-width: none !important;
        min-height: 0 !important;
    }

    .macworld-poster-pass-page {
        width: 210mm !important;
        height: 297mm !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
        overflow: hidden !important;
    }

    .macworld-pass-poster {
        /* 130 x 195 mm keeps the original 2:3 artwork ratio. */
        width: 130mm !important;
        height: 195mm !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
        break-inside: avoid !important;
    }

    .macworld-pass-poster-bg {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    .macworld-pass-poster-qr {
        left: 50% !important;
        top: 50.85% !important;
        width: 29.3% !important;
        aspect-ratio: 1 / 1 !important;
        transform: translateX(-50%) !important;
    }

    .macworld-pass-poster-qr img {
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        object-fit: contain !important;
    }
}

/* PDF download actions */
.macworld-ticket-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
}

.macworld-pass-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid #d8a52b;
    border-radius: 999px;
    background: #0b0500;
    color: #f5c542;
    font-weight: 800;
    text-decoration: none;
    box-sizing: border-box;
}

.macworld-pass-download:hover,
.macworld-pass-download:focus {
    color: #fff2b3;
    border-color: #f5c542;
}
