.thank-you {
  --thank-you-accent: #126b59;
  --thank-you-surface: #f2f4f3;
  --thank-you-border: #dae7e2;
  --thank-you-muted: color-mix(in srgb, currentColor 77%, transparent);
}

.flagship-store .main-container yc-section.thank-you,
.thank-you.product-order__confirmation,
.thank-you--fallback:not([hidden]) {
  display: grid;
  justify-items: center;
  gap: 20px;
  padding-inline: clamp(14px, 4vw, 36px);
}

.thank-you.product-order__confirmation {
  overflow: auto;
  padding-block: 20px;
}

.thank-you--fallback {
  padding-block: clamp(32px, 8vw, 72px);
}

.main-container:has(> [data-order-confirmation-fallback]:not([hidden])) > :not([data-order-confirmation-fallback]) {
  display: none;
}

.thank-you > *:not(:last-child) {
  margin-block-end: 0;
}

.thank-you [hidden] { display: none !important; }

.thank-you__message {
  display: grid;
  justify-items: center;
  gap: 7px;
  max-inline-size: 580px;
  text-align: center;
}

.thank-you__check {
  display: grid;
  place-items: center;
  inline-size: clamp(56px, 12vw, 72px);
  aspect-ratio: 1;
  margin-block-end: 6px;
  border: 1px solid #d7ebe4;
  border-radius: 50%;
  background: #e9f6f1;
  color: var(--thank-you-accent);
}

.thank-you--receipt .thank-you__check {
  inline-size: clamp(56px, 12vw, 78px);
  border: 0;
  background: #e4f2e9;
  color: #398253;
}

.thank-you--receipt .thank-you__check svg { stroke-width: 2; }

.thank-you__message h1 {
  font-size: clamp(20px, 4.2vw, 30px);
  font-weight: 750;
  line-height: 1.35;
  text-wrap: balance;
}

.thank-you__message p {
  font-size: clamp(14px, 3.4vw, 16px);
  color: var(--thank-you-muted);
  text-wrap: balance;
}

.thank-you__message .thank-you__subtitle { font-weight: 600; }

.thank-you__message .thank-you__next-step {
  max-inline-size: 495px;
  margin-block-start: 4px;
  color: #000;
  font-size: clamp(13px, 3.2vw, 15px);
  font-weight: 400;
  line-height: 1.75;
}

.thank-you .order {
  --summary-padding: clamp(13px, 4vw, 24px);
  inline-size: min(100%, 610px);
  min-inline-size: 0;
  border: 1px solid var(--thank-you-border);
  border-radius: 17px;
  background: var(--thank-you-surface);
  color: #20352d;
  box-shadow: 0 8px 28px #163f3010;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.thank-you .order > :is(.title, .items, .summary, .grand-total, .payment) {
  padding: 12px var(--summary-padding);
}

.thank-you .order > :not([hidden]) ~ :not([hidden]) {
  border-block-start: 1px solid var(--thank-you-border);
}

.thank-you .title,
.thank-you .summary-item,
.thank-you .bundle .top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 14px;
  flex-wrap: wrap;
}

.thank-you .title h2 {
  font-size: 17px;
  font-weight: 750;
}

.thank-you .order > .title {
  position: relative;
  align-items: center;
}

.thank-you .order > .title::before {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  width: 3px;
  background: var(--thank-you-accent);
}

.thank-you .order-reference {
  color: var(--thank-you-accent);
  font-size: 13px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e7f2eb;
}

.thank-you .items,
.thank-you .bundles {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  list-style: none;
}

.thank-you .item {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2.2vw, 14px);
}

.thank-you .item .image {
  flex: none;
  inline-size: clamp(50px, 17vw, 76px);
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid var(--thank-you-border);
  border-radius: 8px;
  background: #edf3f0;
}

.thank-you .order > .items > li + li {
  padding-block-start: 10px;
  border-block-start: 1px solid var(--thank-you-border);
}

.thank-you .item .image :is(img, .card-placeholder) {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  object-fit: var(--product-thumbnail-fit, cover);
}

.thank-you .item .card-placeholder {
  display: grid;
  place-items: center;
  color: var(--thank-you-muted);
}

.thank-you .item .info {
  flex: 1;
  min-inline-size: 0;
}

.thank-you .item .name {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.thank-you .item :is(.variant, .quantity) {
  color: var(--thank-you-muted);
  font-size: 12px;
}

.thank-you .item .item-subtotal,
.thank-you .bundle .price {
  color: var(--thank-you-accent);
  font-size: 13px;
  font-weight: 650;
}

.thank-you .item-subtotal {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1px 8px;
  margin-block-start: 3px;
}

.thank-you .item-subtotal s {
  color: var(--thank-you-muted);
  font-size: 11px;
  font-weight: 400;
}

.thank-you .bundle {
  display: grid;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--thank-you-border);
  border-radius: 10px;
}

.thank-you .bundle .heading {
  font-size: 14px;
}

.thank-you .bundle .compare-at {
  color: var(--thank-you-muted);
  text-decoration: line-through;
}

.thank-you .summary,
.thank-you .payment {
  display: grid;
  gap: 7px;
  font-size: 14px;
}

.thank-you :is(.summary, .payment) .label {
  color: var(--thank-you-muted);
}

.thank-you .grand-total {
  color: #155448;
  font-size: clamp(16px, 3.9vw, 19px);
  font-weight: 750;
}

.thank-you .payment {
  font-size: 13px;
}

.thank-you .badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  background: #e7eeea;
}

.thank-you .badge:is([data-status="paid"], [data-status="captured"]) {
  background: #e1f0e8;
  color: #155448;
}

.thank-you .badge[data-status="pending"] {
  background: #f7ecd6;
  color: #75470c;
}

.thank-you__actions {
  inline-size: min(100%, 280px);
}

.thank-you__actions .yc-btn.primary {
  inline-size: 100%;
  min-block-size: 48px;
  border-radius: 9px;
  background: var(--thank-you-accent);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.thank-you__actions .yc-btn.primary:hover {
  background: #0c5446;
}
