/* Checkout progress state ownership.
   The HTML contains five real steps; these rules only define visual state. */
.gtg-rest-checkout .gtg-rest-checkout__progress,
.gtg-rest-checkout.is-complete .gtg-rest-checkout__progress {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.gtg-rest-checkout .gtg-rest-checkout__progress button,
.gtg-rest-checkout .gtg-rest-checkout__progress button:disabled {
  color: var(--gtg-checkout-muted, #665b54) !important;
  opacity: 1 !important;
  cursor: default;
}

.gtg-rest-checkout .gtg-rest-checkout__progress strong {
  color: var(--gtg-checkout-muted, #665b54) !important;
  opacity: .65;
}

.gtg-rest-checkout .gtg-rest-checkout__progress span {
  border: 3px solid var(--gtg-checkout-ink, #25201d) !important;
  background: #d5cdc5 !important;
  opacity: 1 !important;
}

.gtg-rest-checkout .gtg-rest-checkout__progress li.is-active strong,
.gtg-rest-checkout .gtg-rest-checkout__progress li.is-complete:not([data-progress-step="complete"]) strong,
.gtg-rest-checkout.is-complete .gtg-rest-checkout__progress li[data-progress-step="complete"] strong {
  color: var(--gtg-checkout-accent, #ba6548) !important;
  opacity: 1;
}

.gtg-rest-checkout .gtg-rest-checkout__progress li.is-active span,
.gtg-rest-checkout .gtg-rest-checkout__progress li.is-complete:not([data-progress-step="complete"]) span,
.gtg-rest-checkout.is-complete .gtg-rest-checkout__progress li[data-progress-step="complete"] span {
  background: var(--gtg-checkout-accent, #ba6548) !important;
}

.gtg-rest-checkout:not(.is-complete) .gtg-rest-checkout__progress li[data-progress-step="complete"] strong {
  color: var(--gtg-checkout-muted, #665b54) !important;
  opacity: .65 !important;
}

.gtg-rest-checkout:not(.is-complete) .gtg-rest-checkout__progress li[data-progress-step="complete"] span {
  background: #d5cdc5 !important;
}

.gtg-rest-checkout.is-complete .gtg-rest-checkout__layout {
  grid-template-columns: minmax(0, 1fr) !important;
}

.gtg-rest-checkout.is-complete .gtg-rest-checkout__summary {
  display: none !important;
}

/* Completion screen: mirrors the booking confirmation style. */
.gtg-rest-checkout__panel--complete,
.gtg-rest-checkout__panel:has(.gtg-booking__stage--confirmed) {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.gtg-rest-checkout__stage--confirmed {
  display: grid;
  min-height: 430px;
  padding: clamp(1.15rem, 3vw, 1.7rem) 0;
  place-items: center;
}

.gtg-rest-checkout__confirmed-screen {
  display: grid;
  justify-items: center;
  gap: .75rem;
  width: min(100%, 650px);
  margin: 0 auto;
  padding: clamp(1rem, 3vw, 1.45rem);
  border: 2px solid var(--gtg-booking-ink, var(--gtg-checkout-ink, #25201d));
  border-radius: 15px;
  background: var(--gtg-booking-card, #fffdf8);
  box-shadow: 4px 4px 0 var(--gtg-booking-shadow, #25201d);
  color: var(--gtg-booking-ink, var(--gtg-checkout-ink, #25201d));
  text-align: center;
}

.gtg-rest-checkout__success-mark {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  margin-bottom: .1rem;
  border: 3px solid var(--gtg-booking-accent, var(--gtg-checkout-accent, #ba6548));
  border-radius: 999px;
  background: transparent;
  color: var(--gtg-booking-accent, var(--gtg-checkout-accent, #ba6548));
  box-shadow: none;
  animation: gtgBookingSuccessPop .42s cubic-bezier(.2, .9, .25, 1.25) both;
}

.gtg-rest-checkout__success-mark span {
  position: relative;
  display: block;
  width: 38px;
  height: 24px;
  transform: rotate(-45deg);
}

.gtg-rest-checkout__success-mark span::before,
.gtg-rest-checkout__success-mark span::after {
  content: "";
  position: absolute;
  display: block;
  border-radius: 999px;
  background: currentColor;
}

.gtg-rest-checkout__success-mark span::before {
  left: 0;
  bottom: 0;
  width: 10px;
  height: 24px;
  animation: gtgBookingCheckShort .18s ease-out .18s both;
}

.gtg-rest-checkout__success-mark span::after {
  left: 0;
  bottom: 0;
  width: 38px;
  height: 10px;
  animation: gtgBookingCheckLong .24s ease-out .32s both;
}

.gtg-rest-checkout__confirmed-screen .gtg-booking__eyebrow {
  margin: .2rem 0 0;
  color: var(--gtg-booking-accent-dark, #874431);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.gtg-rest-checkout__confirmed-screen h3 {
  margin: 0 0 .1rem;
  color: var(--gtg-booking-ink, var(--gtg-checkout-ink, #25201d));
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1.05;
}

.gtg-rest-checkout__confirmed-screen p {
  max-width: 520px;
  margin: 0;
  color: var(--gtg-booking-muted, #665b54);
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.58;
}

.gtg-rest-checkout__complete-summary {
  display: grid;
  width: min(100%, 520px);
  gap: 0;
  margin: .65rem 0 0;
  text-align: left;
}

.gtg-rest-checkout__complete-summary div {
  display: flex;
  justify-content: space-between;
  gap: .65rem;
  padding: .68rem 0;
  border-bottom: 1px dashed #ccbcae;
}

.gtg-rest-checkout__complete-summary dt {
  color: var(--gtg-booking-muted, #665b54);
  font-size: 1rem;
  font-weight: 500;
}

.gtg-rest-checkout__complete-summary dd {
  margin: 0;
  color: var(--gtg-booking-ink, var(--gtg-checkout-ink, #25201d));
  font-size: 1rem;
  font-weight: 700;
  text-align: right;
}

.gtg-rest-checkout__complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  margin-top: .45rem;
}

@keyframes gtgBookingSuccessPop {
  0% { opacity: 0; transform: scale(.65) rotate(-8deg); }
  70% { opacity: 1; transform: scale(1.06) rotate(2deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes gtgBookingCheckShort {
  from { height: 0; }
  to { height: 24px; }
}

@keyframes gtgBookingCheckLong {
  from { width: 0; }
  to { width: 38px; }
}

@media (max-width: 640px) {
  .gtg-rest-checkout__confirmed-screen {
    box-shadow: 3px 3px 0 var(--gtg-booking-shadow, #25201d);
  }

  .gtg-rest-checkout__complete-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .gtg-rest-checkout__complete-actions .gtg-rest-checkout__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gtg-rest-checkout__success-mark,
  .gtg-rest-checkout__success-mark span::before,
  .gtg-rest-checkout__success-mark span::after {
    animation: none;
  }
}
