@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,500;0,9..40,600;0,9..40,700;0,9..40,800;1,9..40,500&family=Fraunces:opsz,wght@9..144,600;9..144,700&display=swap');

.hidden {
  display: none !important;
}

/* Shared lunch ticket styling */

.lunch-ticket-wrap {
  max-width: 380px;
  margin: 1.25rem auto 0;
  font-family: 'DM Sans', system-ui, sans-serif;
}

.lunch-ticket {
  max-width: 380px;
  margin: 0 auto;
  border: 2px dashed #b8892a;
  border-radius: 18px;
  background: #fff;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.7) inset,
    0 14px 36px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  text-align: center;
  color: #0f172a;
}

.lunch-ticket-header {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(255, 255, 255, 0.18) 0%, transparent 55%),
    linear-gradient(145deg, #163f78 0%, #1d4ed8 55%, #2563eb 100%);
  color: #fff;
  padding: 1.05rem 1.05rem 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
  position: relative;
}

.lunch-ticket-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 14px;
  background: #fff;
  border-radius: 14px 14px 0 0;
}

.lunch-ticket-header-main {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.lunch-ticket-mark {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  color: #1d4ed8;
  display: grid;
  place-items: center;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
  position: relative;
  z-index: 1;
}

.lunch-ticket-mark small {
  display: block;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 0.12rem;
}

.lunch-ticket-logo {
  width: 58px;
  height: 58px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  padding: 3px;
  position: relative;
  z-index: 1;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.lunch-ticket-org {
  font-size: 0.68rem;
  line-height: 1.35;
  opacity: 0.95;
  font-weight: 600;
}

.lunch-ticket-title {
  margin: 0.4rem 0 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
  line-height: 1.15;
  text-align: left;
  letter-spacing: -0.01em;
}

.lunch-ticket-subtitle {
  margin: 0.3rem 0 0;
  font-size: 0.9rem;
  opacity: 0.92;
  text-align: left;
  font-weight: 500;
}

.lunch-ticket-body {
  padding: 0.35rem 1.2rem 1.15rem;
}

.lunch-ticket-name {
  font-size: 1.28rem;
  font-weight: 800;
  color: #102a56;
  margin: 0 0 0.85rem;
  letter-spacing: -0.02em;
}

.lunch-ticket-menu {
  text-align: left;
  margin: 0 auto 0.85rem;
  max-width: 300px;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: #f5f8fc;
  border: 1px solid #dbe5f1;
}

.lunch-ticket-menu h4 {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #64748b;
  font-weight: 700;
}

.lunch-ticket-menu ul {
  margin: 0;
  padding-left: 1.1rem;
}

.lunch-ticket-menu li {
  margin: 0.25rem 0;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.92rem;
}

.lunch-ticket-amount {
  font-size: 1.08rem;
  font-weight: 800;
  color: #163f78;
  margin-bottom: 0.85rem;
}

.lunch-ticket-qr-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.75rem;
}

.lunch-ticket-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  margin: 0 auto;
  padding: 0.32rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.lunch-ticket-status.paid {
  background: #dcfce7;
  color: #166534;
}

.lunch-ticket-status.unpaid {
  background: #ffedd5;
  color: #9a3412;
}

.lunch-ticket-qr {
  display: block;
  width: 188px;
  height: 188px;
  margin: 0 auto;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 8px;
  box-sizing: border-box;
}

.lunch-ticket-code {
  margin: 0.55rem 0 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  color: #64748b;
  word-break: break-all;
  line-height: 1.4;
}

.lunch-ticket-footnote {
  margin: 0.8rem 0 0;
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.45;
}

.lunch-ticket-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: 0.95rem;
  max-width: 380px;
  margin-left: auto;
  margin-right: auto;
}

.lunch-ticket-btn {
  border: 1px solid #c7d2fe;
  border-radius: 11px;
  padding: 0.72rem 0.85rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: #eef2ff;
  color: #1e3a8a;
}

.lunch-ticket-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lunch-ticket-btn.primary {
  border-color: transparent;
  background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%);
  color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

.lunch-ticket-btn.primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.lunch-ticket-download-hint {
  margin: 0.55rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
}

.lunch-ticket-download-hint.is-error {
  color: #b42318;
}

@media (max-width: 420px) {
  .lunch-ticket-actions {
    grid-template-columns: 1fr;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  .lunch-ticket,
  .lunch-ticket * {
    visibility: visible;
  }

  .lunch-ticket {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    margin: 0 auto;
    box-shadow: none;
  }

  .lunch-ticket-actions,
  .lunch-ticket-screen-only,
  .lunch-ticket-download-hint {
    display: none !important;
  }
}
