/* css/styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Space+Mono:wght@700&display=swap');

:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-gradient: linear-gradient(135deg, #f0fdf4 0%, #dbeafe 100%);
  --card-bg: rgba(255, 255, 255, 0.85);
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: rgba(226, 232, 240, 0.8);
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Glassmorphism utility */
.glass {
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
}

/* Screen wrapper */
.screen-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  box-sizing: border-box;
}

header {
  text-align: center;
  margin-bottom: 3rem;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

header p {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Print Only Section */
@media screen {
  .print-only {
    display: none !important;
  }
}

@media print {
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  
  @page {
    margin: 0;
    size: 57mm auto; /* Explicitly tell the browser the paper width is 57mm */
  }
  
  body {
    background: #fff;
    margin: 0;
    padding: 0;
    width: 57mm; /* Match the 57x40mm paper roll width exactly */
  }

  .ticket {
    width: 100%;
    box-sizing: border-box; /* Prevent padding from blowing up the width */
    text-align: center;
    font-family: 'Space Mono', monospace;
    padding-top: 5mm;
    padding-bottom: 10mm; /* Added extra bottom padding so text doesn't cut off when tearing */
    padding-left: 2mm; /* Ensure text doesn't stick directly to the paper edge */
    padding-right: 2mm;
    color: #000;
  }

  .ticket h2 {
    font-size: 16px;
    margin: 0;
    text-transform: uppercase;
  }

  .ticket h3 {
    font-size: 26px; /* Slightly reduced to ensure long codes fit within 57mm safely */
    margin: 10px 0;
    border-top: 1px dashed #000;
    border-bottom: 1px dashed #000;
    padding: 5px 0;
    font-weight: 700;
  }

  .ticket p {
    font-size: 11px; /* Slightly reduced base font for better fit */
    margin: 5px 0;
  }
}
