/**
 * Zeva Digital E-Ticket Pass Stylesheet
 * Exact Resolution Standard: 1,498.67 px by 2,664.3 px (9:16 Aspect Ratio)
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/PlusJakartaSans-Bold.ttf') format('truetype');
  font-weight: 700 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/PlusJakartaSans-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/PlusJakartaSans-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url('../fonts/PlusJakartaSans-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Default: Zeva Signature Light Palette */
  --zt-top-bar: #7F22FE;
  --zt-bottom-bar: #7F22FE;
  --zt-bg: #E7E7E9;
  --zt-text: #0B0B0E;
  --zt-dashed: #5E5D6A;
  --zt-qr-bg: #FFFFFF;
  --zt-qr-border: #000000;
  --zt-notch-bg: #0B0A12;
  --zt-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Palette 2: Zeva Electric Orange Dark */
[data-ticket-theme="dark-orange"] {
  --zt-top-bar: #FF5700;
  --zt-bottom-bar: #FF5700;
  --zt-bg: #201A2F;
  --zt-text: #FFFFFF;
  --zt-dashed: #7E7A8E;
  --zt-qr-bg: #FFFFFF;
  --zt-qr-border: #000000;
  --zt-notch-bg: #0B0A12;
}

/* Palette 3: Zeva Imperial Violet Dark */
[data-ticket-theme="dark-violet"] {
  --zt-top-bar: #8B3DFF;
  --zt-bottom-bar: #8B3DFF;
  --zt-bg: #1A1529;
  --zt-text: #FFFFFF;
  --zt-dashed: #77718A;
  --zt-qr-bg: #FFFFFF;
  --zt-qr-border: #000000;
  --zt-notch-bg: #0B0A12;
}

/* Palette 4: Sunset Neon Obsidian */
[data-ticket-theme="sunset-neon"] {
  --zt-top-bar: #FF4500;
  --zt-bottom-bar: #FF4500;
  --zt-bg: #121118;
  --zt-text: #FFFFFF;
  --zt-dashed: #615E6D;
  --zt-qr-bg: #FFFFFF;
  --zt-qr-border: #000000;
  --zt-notch-bg: #0B0A12;
}

/* Palette 5: Duo-Tone Electric */
[data-ticket-theme="duo-tone"] {
  --zt-top-bar: #7F22FE;
  --zt-bottom-bar: #FF5700;
  --zt-bg: #1E182D;
  --zt-text: #FFFFFF;
  --zt-dashed: #7C778D;
  --zt-qr-bg: #FFFFFF;
  --zt-qr-border: #000000;
  --zt-notch-bg: #0B0A12;
}

/* Base Wrapper for Responsive Display */
.zeva-ticket-wrapper {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  box-sizing: border-box;
  position: relative;
  user-select: none;
}

/* The Ticket Pass Container: scaled proportionally to 1498.67 x 2664.3 */
.zeva-ticket-card {
  position: relative;
  width: 100%;
  aspect-ratio: 1498.67 / 2664.3;
  background-color: var(--zt-bg);
  border-radius: clamp(24px, 5.6vw, 42px);
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-family: var(--zt-font);
  color: var(--zt-text);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Top Rounded Bar */
.zeva-ticket-top-bar {
  height: 6.2%;
  width: 100%;
  background-color: var(--zt-top-bar);
  border-top-left-radius: clamp(24px, 5.6vw, 42px);
  border-top-right-radius: clamp(24px, 5.6vw, 42px);
  flex-shrink: 0;
  transition: background-color 0.25s ease;
}

/* Bottom Rounded Bar */
.zeva-ticket-bottom-bar {
  height: 3.1%;
  width: 100%;
  background-color: var(--zt-bottom-bar);
  border-bottom-left-radius: clamp(24px, 5.6vw, 42px);
  border-bottom-right-radius: clamp(24px, 5.6vw, 42px);
  flex-shrink: 0;
  transition: background-color 0.25s ease;
}

/* Ticket Content Area */
.zeva-ticket-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 3.5% 6.5% 2%;
  position: relative;
  overflow: hidden;
}

/* Fixed-Height Title Bounding Box */
.zeva-ticket-title-container {
  height: 14.5%; /* Fixed strict height */
  max-height: 14.5%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0 2%;
  margin-bottom: 3%;
}

.zeva-ticket-title-text {
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--zt-text);
  text-align: center;
  margin: 0;
  word-break: break-word;
  transition: font-size 0.15s ease, color 0.25s ease;
}

/* Metadata Rows Container */
.zeva-ticket-metadata {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: clamp(12px, 2.5vw, 22px);
  width: 100%;
  padding: 0 1%;
  margin-bottom: 2%;
}

/* Individual Metadata Row: standalone centered single-line item */
.zeva-ticket-row {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  font-size: clamp(11px, 2.5vw, 16px);
  font-weight: 400;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
}

.zeva-ticket-row .row-label {
  color: var(--zt-text);
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 400;
}

.zeva-ticket-row .row-leader {
  display: inline-block;
  margin: 0 6px;
  color: var(--zt-dashed);
  font-weight: 400;
  white-space: nowrap;
  user-select: none;
  font-size: 0.9em;
  opacity: 0.9;
}
.zeva-ticket-row .row-leader::before {
  content: "- - - - - - - - - - - -";
}

.zeva-ticket-row .row-value {
  color: var(--zt-text);
  white-space: nowrap;
  flex-shrink: 1;
  font-weight: 400;
  text-align: left;
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Circular Edge Notches (Perforation Tear Cutouts) */
.zeva-ticket-notch {
  position: absolute;
  top: 50.8%; /* Precisely between metadata and QR card */
  width: clamp(26px, 6.2vw, 44px);
  height: clamp(52px, 12.4vw, 88px);
  background-color: var(--zt-notch-bg);
  z-index: 10;
  pointer-events: none;
}

.zeva-ticket-notch-left {
  left: 0;
  border-top-right-radius: 9999px;
  border-bottom-right-radius: 9999px;
}

.zeva-ticket-notch-right {
  right: 0;
  border-top-left-radius: 9999px;
  border-bottom-left-radius: 9999px;
}

/* QR Code Central Floating Card */
.zeva-ticket-qr-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: auto;
  margin-bottom: 3.5%;
}

.zeva-ticket-qr-card {
  width: 61%;
  aspect-ratio: 1 / 1;
  background-color: var(--zt-qr-bg);
  border: clamp(5px, 1.1vw, 9px) solid var(--zt-qr-border);
  border-radius: clamp(24px, 5.8vw, 44px);
  box-shadow: 0 clamp(16px, 4vw, 32px) clamp(30px, 6vw, 55px) -8px rgba(0, 0, 0, 0.42);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 6%;
  box-sizing: border-box;
}

.zeva-ticket-qr-canvas,
.zeva-ticket-qr-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  image-rendering: pixelated;
}

/* Center Logo Badge inside QR Code */
.zeva-ticket-qr-center-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 22%;
  height: 22%;
  background-color: #FFFFFF;
  border-radius: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  padding: 2px;
}

.zeva-ticket-qr-center-badge img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

/* Footer Platform Branding */
.zeva-ticket-footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: clamp(15px, 3.5vw, 24px);
  font-weight: 800;
  color: var(--zt-text);
  letter-spacing: -0.02em;
  margin-top: 1.5%;
  margin-bottom: 1%;
}

.zeva-ticket-footer-brand img {
  width: clamp(18px, 4vw, 26px);
  height: clamp(18px, 4vw, 26px);
  object-fit: contain;
}
