/* Summary section, receipt, totals */
.summary-section {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 88% -10%, rgba(47, 109, 255, .34), transparent 62%),
    radial-gradient(700px 360px at -5% 100%, rgba(6, 182, 212, .18), transparent 60%),
    linear-gradient(155deg, #061528 0%, #0a2450 48%, #0e337a 100%);
  color: #fff;
  padding: 68px 0;
}
.summary-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(700px 380px at 80% 0%, #000 10%, transparent 72%);
  -webkit-mask-image: radial-gradient(700px 380px at 80% 0%, #000 10%, transparent 72%);
  pointer-events: none;
}
.summary-section .container { position: relative; }
.summary-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .75fr);
  gap: 22px;
  align-items: start;
  max-width: 1080px;
  margin: 32px auto 0;
}
.receipt {
  padding: 24px;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 50px 100px -55px rgba(0, 0, 0, .8);
}
.receipt-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.receipt-kicker {
  display: block;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #7c8ba1;
}
.receipt-head h3 { margin-top: 2px; font-size: 16.5px; letter-spacing: -.02em; }
.receipt-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.receipt-chip {
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid #dfe9fb;
  background: #eef4ff;
  color: #1746b5;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .02em;
  white-space: nowrap;
}
.receipt-chip.is-discount { background: #e9f9f1; border-color: #c8eeda; color: #0c7a4d; }

.line-items { margin-top: 2px; }
.line-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px dashed #e8eef7;
}
.line-info { min-width: 0; }
.line-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.line-group {
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid #e2ebf8;
  background: #f0f5fc;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #5d7394;
}
.line-info strong { font-size: 12.5px; letter-spacing: -.01em; }
.line-meta { display: block; margin-top: 2px; font-size: 10.5px; color: #73839a; }
.line-side { display: flex; align-items: center; gap: 8px; flex: none; }
.line-total { font-size: 12px; font-weight: 800; white-space: nowrap; }
.line-remove {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  background: #f4f7fc;
  color: #8d9cb0;
  transition: background .15s ease, color .15s ease;
}
.line-remove:hover { background: #fdecec; color: #c62828; }
.line-remove .ico { width: 11px; height: 11px; }

.totals {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: #f8fafd;
}
.sum-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 0;
  font-size: 11.5px;
  color: #4d6079;
}
.sum-row span:last-child { font-weight: 700; color: #24384f; white-space: nowrap; }
.sum-row.is-discount, .sum-row.is-discount span:last-child { color: #0c7a4d; }
.sum-row.is-muted { color: #73839a; }
.sum-row.is-muted span:last-child { color: #475a73; }
.sum-row.is-total {
  margin-top: 5px;
  padding-top: 9px;
  border-top: 1px solid #e2e9f3;
  font-size: 12px;
  font-weight: 800;
  color: #12233d;
}
.sum-row.is-total span:last-child { color: #12233d; }

.grand {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 16px;
  border-radius: 15px;
  background: linear-gradient(135deg, #0a2a6b, #1b5cff);
  box-shadow: 0 22px 40px -26px rgba(27, 92, 255, .95);
  color: #fff;
}
.grand-main span {
  display: block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: #c1d5ff;
}
.grand-main strong {
  display: block;
  margin-top: 2px;
  font-size: clamp(21px, 2.6vw, 25px);
  line-height: 1.1;
  letter-spacing: -.035em;
}
.grand-main small { display: block; margin-top: 4px; font-size: 9.5px; color: #b6cdf7; }
.grand-side {
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, .22);
  text-align: right;
}
.grand-side span {
  display: block;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #c1d5ff;
}
.grand-side strong { display: block; margin-top: 2px; font-size: 14px; letter-spacing: -.02em; }
.grand-side small { display: block; font-size: 9px; color: #b6cdf7; }

.receipt-alert {
  margin-top: 12px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid #ffe2a8;
  background: #fff8e6;
  color: #8a5a00;
  font-size: 10.5px;
  line-height: 1.5;
}
.receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.receipt-actions .btn { flex: 1 1 auto; }
.receipt-actions .btn .ico { width: 14px; height: 14px; }
.receipt-fine { margin-top: 10px; font-size: 9.5px; line-height: 1.5; color: #8794a8; }

.receipt-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 34px 12px 30px;
  text-align: center;
}
.receipt-empty > .ico { width: 32px; height: 32px; color: #9db0c8; }
.receipt-empty h4 { font-size: 14.5px; letter-spacing: -.01em; }
.receipt-empty p { max-width: 38ch; font-size: 12px; line-height: 1.6; color: #6b7d96; }
.receipt-empty .btn { margin-top: 4px; }

.summary-notes {
  padding: 22px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.summary-notes h3 { font-size: 14.5px; letter-spacing: -.01em; }
.calc-list { display: grid; gap: 11px; margin-top: 14px; }
.calc-list li { display: flex; gap: 9px; font-size: 11.5px; line-height: 1.6; color: rgba(226, 237, 255, .78); }
.calc-list .ico { width: 15px; height: 15px; flex: none; margin-top: 2px; color: #7fb0ff; }
.calc-list strong { color: #fff; }
.summary-foot {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: 10.5px;
  line-height: 1.55;
  color: rgba(203, 219, 243, .62);
}

@media (max-width: 1000px) {
  .summary-layout { grid-template-columns: 1fr; max-width: 720px; }
  .summary-notes { order: -1; }
  .summary-notes .calc-list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .summary-section { padding: 48px 0; }
  .receipt { padding: 18px; }
  .summary-notes { padding: 18px; }
  .summary-notes .calc-list { grid-template-columns: 1fr; }
  .grand { align-items: flex-start; }
  .grand-side { border-left: 0; padding-left: 0; text-align: left; }
  .receipt-actions .btn { flex: 1 1 100%; }
}
