/* v19: payment models with step charts, and the "no hidden extras" receipt printer. */

/* Payment tabs: a soft segmented bar; the selected model lifts out as a dark tile. */

.pay-tabs {
  margin-top: 56px;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-radius: var(--card-r);
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.pay-tabs button {
  padding: 16px 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 300ms ease, color 300ms ease, box-shadow 300ms ease;
}

.pay-tabs button small {
  padding-top: 0.55em;
  color: var(--text-3);
  font-size: 0.66rem;
  font-weight: 700;
}

.pay-tabs b {
  display: block;
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 560;
  letter-spacing: -0.035em;
}

.pay-tabs em {
  display: block;
  margin-top: 2px;
  color: var(--text-3);
  font-size: 0.82rem;
  font-style: normal;
}

.pay-tabs button[aria-selected="true"] {
  background: var(--ink-deep);
  color: var(--paper);
  box-shadow: 0 18px 30px -18px rgba(17, 24, 33, 0.6);
}

.pay-tabs button[aria-selected="true"] small {
  color: var(--gold);
}

.pay-tabs button[aria-selected="true"] em {
  color: rgba(244, 240, 232, 0.6);
}

.pay-card {
  margin-top: 10px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--card-r);
  background: #fbf9f4;
  box-shadow: inset 0 0 0 1px var(--line);
}

.pay-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 48px;
  animation: panel-in 600ms var(--ease-settle);
}

.pay-panel[hidden] {
  display: none;
}

.pay-lead {
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.025em;
}

.pay-callout {
  margin-top: 22px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 14px;
  background: var(--paper-2);
  font-size: 0.94rem;
  font-weight: 600;
}

.pay-callout i {
  width: 14px;
  height: 14px;
  flex: none;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: var(--gold);
}

.pay-rows {
  margin: 32px 0 28px;
}

.pay-rows div {
  padding: 14px 0;
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 16px;
  border-top: 1px solid var(--line-strong);
}

.pay-rows div:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.pay-rows dt {
  padding-top: 3px;
  color: var(--text-3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pay-rows dd {
  margin: 0;
  font-size: 0.96rem;
}

.pay-copy .pill-line {
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.pay-figure {
  margin: 0;
  padding: 22px 24px 16px;
  border-radius: 20px;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

.pay-fig-head {
  display: flex;
  justify-content: space-between;
  color: var(--text-3);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pay-fig-head span:first-child {
  color: var(--text);
}

.pay-chart {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 14px;
  overflow: visible;
}

.pc-grid {
  stroke: rgba(23, 26, 31, 0.07);
}

.pc-row {
  stroke: rgba(23, 26, 31, 0.1);
  stroke-dasharray: 3 4;
}

.pc-axis {
  fill: var(--text-3);
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pc-axis.is-muted {
  fill: rgba(23, 26, 31, 0.3);
}

.pc-hatch {
  stroke: rgba(139, 113, 63, 0.22);
  stroke-width: 2;
}

.pc-extra {
  opacity: 0.9;
}

.pc-ceiling {
  stroke: var(--ink);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.pc-area {
  fill: rgba(199, 168, 107, 0.2);
}

.pc-line {
  fill: none;
  stroke: var(--gold-ink);
  stroke-width: 2.5;
  stroke-linejoin: round;
}

.pc-line[pathLength] {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.pc-dash {
  stroke-dasharray: 5 5;
  opacity: 0.6;
}

.pc-dot {
  fill: var(--gold-ink);
  stroke: #fbf9f4;
  stroke-width: 2.5;
}

.pc-tags rect {
  fill: var(--gold);
}

.pc-tags text,
.pc-flag text,
.pc-note text {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-anchor: middle;
}

.pc-tags text {
  fill: var(--ink);
}

.pc-flag rect {
  fill: var(--ink);
}

.pc-flag text {
  fill: var(--paper);
}

.pc-note rect {
  fill: #fbf9f4;
  stroke: rgba(23, 26, 31, 0.25);
  stroke-dasharray: 3 3;
}

.pc-note text {
  fill: var(--text-2);
  font-weight: 600;
}

.pc-band {
  fill: rgba(199, 168, 107, 0.14);
}

.pc-bar {
  fill: rgba(199, 168, 107, 0.3);
}

.pc-bar-top {
  fill: var(--gold-ink);
}

/* Charts draw in each time their panel shows. */
@media (prefers-reduced-motion: no-preference) {
  .pay-panel:not([hidden]) .pc-line[pathLength] {
    animation: pc-draw 1600ms var(--ease-io) both;
  }

  .pay-panel:not([hidden]) .pc-area {
    animation: pc-fade 900ms ease 700ms both;
  }

  .pay-panel:not([hidden]) .pc-dot,
  .pay-panel:not([hidden]) .pc-tags,
  .pay-panel:not([hidden]) .pc-flag,
  .pay-panel:not([hidden]) .pc-note {
    animation: pc-pop 500ms var(--ease-out) 1100ms both;
  }

  .pay-panel:not([hidden]) .pc-bars rect {
    transform-box: fill-box;
    transform-origin: bottom;
    animation: pc-grow 900ms var(--ease-settle) both;
  }

  .pc-bars rect:nth-child(3), .pc-bars rect:nth-child(4) { animation-delay: 90ms; }
  .pc-bars rect:nth-child(5), .pc-bars rect:nth-child(6) { animation-delay: 180ms; }
  .pc-bars rect:nth-child(7), .pc-bars rect:nth-child(8) { animation-delay: 270ms; }
  .pc-bars rect:nth-child(9), .pc-bars rect:nth-child(10) { animation-delay: 360ms; }
  .pc-bars rect:nth-child(11), .pc-bars rect:nth-child(12) { animation-delay: 450ms; }
}

@keyframes pc-draw {
  from {
    stroke-dashoffset: 1;
  }
}

@keyframes pc-fade {
  from {
    opacity: 0;
  }
}

@keyframes pc-pop {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes pc-grow {
  from {
    transform: scaleY(0);
  }
}

.pay-legend {
  margin-top: 12px;
  padding-top: 12px;
  display: flex;
  gap: 24px;
  border-top: 1px solid var(--line);
  color: var(--text-2);
  font-size: 0.8rem;
}

.pay-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pay-legend i {
  display: inline-block;
  width: 18px;
  height: 10px;
}

.lg-dash {
  border-top: 1.5px dashed var(--ink);
  height: 0 !important;
}

.lg-hatch {
  border: 1px dashed rgba(23, 26, 31, 0.3);
  border-radius: 3px;
  background: repeating-linear-gradient(45deg, rgba(139, 113, 63, 0.25) 0 2px, transparent 2px 5px);
}

.lg-band {
  border-radius: 3px;
  background: rgba(199, 168, 107, 0.3);
}

.lg-dot {
  width: 10px !important;
  border-radius: 50%;
  background: var(--gold-ink);
}

.lg-bar {
  border-radius: 3px;
  background: rgba(199, 168, 107, 0.45);
  box-shadow: inset 0 2px 0 var(--gold-ink);
}

/* No hidden extras: a midnight block with a thermal receipt printer. */

.noextras {
  --text: #f4f0e8;
  --text-2: rgba(244, 240, 232, 0.7);
  --text-3: rgba(244, 240, 232, 0.5);
  --line: rgba(244, 240, 232, 0.12);
  --line-strong: rgba(244, 240, 232, 0.18);
  margin-top: 120px;
  padding: clamp(32px, 5vw, 80px);
  border-radius: var(--sheet-r);
  background: var(--ink-deep);
  color: var(--text);
}

.noextras .big em {
  color: rgba(244, 240, 232, 0.45);
}

.noextras-grid {
  margin-top: 56px;
  padding-top: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
  gap: 64px;
  align-items: start;
  border-top: 1px solid var(--line);
}

.noextras-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.noextras-list li {
  padding: 28px 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
}

.noextras-list li:first-child {
  padding-top: 0;
}

.noextras-list small {
  padding-top: 6px;
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 700;
}

.noextras-list h3 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.noextras-list p {
  max-width: 44ch;
  margin-top: 8px;
  color: var(--text-2);
  font-size: 0.94rem;
}

.noextras-note {
  margin-top: 28px;
  color: var(--text-3);
  font-size: 0.8rem;
}

.printer {
  position: relative;
}

.printer-head {
  position: relative;
  z-index: 2;
  height: 64px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, #2a313b, #1b2028);
  box-shadow:
    inset 0 1px 0 rgba(244, 240, 232, 0.08),
    0 20px 40px -20px rgba(0, 0, 0, 0.8);
}

/* The paper exits through this lip at the bottom of the printer. */
.printer-head::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  height: 10px;
  border-radius: 0 0 8px 8px;
  background: #0d1116;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.6);
}

.printer-name {
  color: rgba(244, 240, 232, 0.55);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.printer-grille {
  flex: 1;
  height: 8px;
  background: radial-gradient(circle, rgba(244, 240, 232, 0.16) 1px, transparent 1.5px) 0 0 / 5px 4px;
}

.printer-led {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(244, 240, 232, 0.2);
  transition: background-color 300ms ease, box-shadow 300ms ease;
}

.printer[data-state="printing"] .printer-led {
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
  animation: led 700ms steps(1) infinite;
}

.printer[data-state="done"] .printer-led {
  background: var(--gold);
  box-shadow: 0 0 8px var(--gold-glow);
}

@keyframes led {
  50% {
    opacity: 0.3;
  }
}

.printer-btn {
  padding: 8px 14px;
  border: 0;
  border-radius: 99px;
  background: rgba(244, 240, 232, 0.06);
  box-shadow: inset 0 0 0 1px rgba(244, 240, 232, 0.16);
  color: rgba(244, 240, 232, 0.8);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms ease;
}

.printer-btn:hover {
  background: rgba(244, 240, 232, 0.12);
}

.printer-btn:active {
  transform: scale(0.96);
}

/* Clip only above the slot, so the paper can feed and later fall freely. */
.printer-slot {
  position: relative;
  z-index: 1;
  margin: 0 22px;
  clip-path: inset(0 -60px -200vh -60px);
}

.receipt {
  position: relative;
  padding: 26px 26px 22px;
  background: #fbf9f4;
  color: #171a1f;
  font-family: "Manrope", ui-monospace, monospace;
  font-size: 0.8rem;
  box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.7);
  cursor: grab;
  touch-action: none;
  user-select: none;
  /* Torn, zig-zag bottom edge. */
  -webkit-mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat,
    conic-gradient(from -45deg at bottom, #000 90deg, transparent 0) bottom / 14px 7px repeat-x;
  mask:
    linear-gradient(#000 0 0) top / 100% calc(100% - 7px) no-repeat,
    conic-gradient(from -45deg at bottom, #000 90deg, transparent 0) bottom / 14px 7px repeat-x;
}

.receipt.is-dragging {
  cursor: grabbing;
}

.receipt > *,
.receipt li {
  opacity: 0;
  transition: opacity 200ms ease;
}

.receipt .is-in {
  opacity: 1;
}

.receipt ul {
  margin: 0;
  padding: 0;
  list-style: none;
  opacity: 1;
}

.rc-head,
.rc-cols {
  display: flex;
  justify-content: space-between;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.rc-cols {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(23, 26, 31, 0.3);
  color: rgba(23, 26, 31, 0.45);
  font-weight: 700;
}

.rc-line {
  padding: 13px 0;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px dashed rgba(23, 26, 31, 0.18);
}

.rc-line b {
  display: block;
  font-weight: 700;
}

.rc-line small {
  display: block;
  margin-top: 2px;
  color: rgba(23, 26, 31, 0.55);
  font-size: 0.72rem;
}

.rc-line em {
  color: var(--gold-ink);
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.rc-total {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 700;
}

.rc-total b {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.rc-stamp {
  position: absolute;
  right: 78px;
  bottom: 56px;
  width: 86px;
  height: 86px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(139, 113, 63, 0.75);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px #fbf9f4, inset 0 0 0 5px rgba(139, 113, 63, 0.5);
  color: rgba(139, 113, 63, 0.9);
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0.12em;
  text-align: center;
  text-transform: uppercase;
  transform: rotate(-14deg) scale(1.3);
  transition: opacity 200ms ease, transform 400ms var(--ease-out);
}

.rc-stamp.is-in {
  transform: rotate(-14deg) scale(1);
}

.rc-code {
  height: 34px;
  margin-top: 18px;
  background: repeating-linear-gradient(90deg, #171a1f 0 2px, transparent 2px 4px, #171a1f 4px 5px, transparent 5px 8px, #171a1f 8px 11px, transparent 11px 13px);
}

.rc-foot {
  margin-top: 10px;
  color: rgba(23, 26, 31, 0.55);
  font-size: 0.7rem;
  text-align: center;
}

.printer-hint {
  margin-top: 26px;
  color: var(--text-3);
  font-size: 0.78rem;
  text-align: center;
  opacity: 0;
  transition: opacity 400ms ease;
}

.printer[data-state="done"] .printer-hint {
  opacity: 1;
}

@media (max-width: 960px) {
  .pay-panel,
  .noextras-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .pay-tabs {
    grid-template-columns: 1fr;
  }

  .pay-rows div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .noextras-grid {
    gap: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .printer[data-state="printing"] .printer-led {
    animation: none;
  }
}
