/* Change these two to match the MMG brand. */
:root {
  --mmg-green: #154734;
  --mmg-gold: #bd8b13;
  --mmg-ink: #1d2420;
  --mmg-muted: #5f6b64;
  --mmg-paper: #ffffff;
}

/* ---------- Button inside each coupon card ---------- */

.mmg-redeem {
  margin: 0.75em 0 0;
  text-align: center;
}

.mmg-redeem__btn {
  font: inherit;
  font-weight: 700;
  font-size: 1.05em;
  min-height: 48px;
  padding: 0.6em 1.6em;
  border: 2px solid var(--mmg-green);
  border-radius: 999px;
  background: var(--mmg-green);
  color: #fff;
  cursor: pointer;
}
.mmg-redeem__btn:hover:not(:disabled) { background: #0f3627; }
.mmg-redeem__btn:focus-visible { outline: 3px solid var(--mmg-gold); outline-offset: 3px; }
.mmg-redeem__btn:disabled { cursor: default; }

.mmg-redeem__count {
  margin: 0.4em 0 0;
  font-size: 0.85em;
  color: var(--mmg-muted);
}

.mmg-redeem.is-expired .mmg-redeem__btn {
  background: transparent;
  color: var(--mmg-muted);
  border-color: currentColor;
  border-style: dashed;
}

/* ---------- Overlay ---------- */

html.mmg-lock, html.mmg-lock body { overflow: hidden; }

.mmg-overlay {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(16, 28, 22, 0.72);
  font-family: inherit;
}
.mmg-overlay[hidden], .mmg-panel[hidden] { display: none; }

.mmg-panel--confirm {
  width: min(26rem, 100%);
  padding: 1.75rem 1.5rem 1.25rem;
  border-radius: 14px;
  background: var(--mmg-paper);
  color: var(--mmg-ink);
  text-align: center;
}
.mmg-panel__title { margin: 0 0 0.5rem; font-size: 1.35rem; line-height: 1.25; }
.mmg-panel__deal { margin: 0 0 1rem; font-weight: 700; color: var(--mmg-green); }
.mmg-panel__note { margin: 0 0 1.25rem; font-size: 0.95rem; color: var(--mmg-muted); }
.mmg-panel__error { margin: 0.75rem 0 0; color: #a12622; font-weight: 600; min-height: 1.2em; }

.mmg-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  font: inherit;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: 10px;
  border: 0;
  cursor: pointer;
}
.mmg-btn:focus-visible { outline: 3px solid var(--mmg-gold); outline-offset: 3px; }
.mmg-btn--primary { background: var(--mmg-green); color: #fff; }
.mmg-btn--primary:disabled { opacity: 0.6; cursor: default; }
.mmg-btn--quiet { background: none; color: var(--mmg-muted); margin-top: 0.4rem; font-weight: 600; font-size: 1rem; }
.mmg-btn--light { background: #fff; color: var(--mmg-green); margin-top: 1.5rem; max-width: 16rem; margin-inline: auto; }

/* ---------- Success screen ----------
   Full screen and always moving, so the cashier can tell
   a live redemption from a screenshot at a glance. */

.mmg-panel--success {
  position: fixed;
  inset: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background: var(--mmg-green);
  color: #fff;
  text-align: center;
}

.mmg-sweep {
  position: absolute;
  inset: -50% -100%;
  background: linear-gradient(100deg, transparent 42%, rgba(189, 139, 19, 0.55) 50%, transparent 58%);
  animation: mmg-sweep 2.4s linear infinite;
}
@keyframes mmg-sweep {
  from { transform: translateX(-35%); }
  to   { transform: translateX(35%); }
}

.mmg-success__body { position: relative; }

.mmg-check { width: 5.5rem; height: 5.5rem; margin: 0 auto 0.5rem; display: block; }
.mmg-check circle { fill: none; stroke: var(--mmg-gold); stroke-width: 3; }
.mmg-check path {
  fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 40; stroke-dashoffset: 40;
  animation: mmg-draw 0.45s 0.1s ease-out forwards;
}
@keyframes mmg-draw { to { stroke-dashoffset: 0; } }

.mmg-success__title { margin: 0; font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.05; letter-spacing: -0.01em; color: #fff; }
.mmg-success__deal { margin: 0.5rem 0 1.5rem; font-size: 1.15rem; font-weight: 600; }

.mmg-clock {
  margin: 0;
  font-size: clamp(2.6rem, 13vw, 4.5rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--mmg-gold);
}
.mmg-clock__date { margin: 0.4rem 0 0; font-size: 1rem; opacity: 0.85; }
.mmg-success__number { margin: 1rem 0 0; font-size: 0.95rem; opacity: 0.85; }

@media (prefers-reduced-motion: reduce) {
  /* The ticking clock still proves it's live. */
  .mmg-sweep { animation: none; display: none; }
  .mmg-check path { animation: none; stroke-dashoffset: 0; }
}
