.checkout {
  margin: 0 auto 260px;
  width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.checkout h3 {
  margin-bottom: 48px;
}
.checkout__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Step card ── */
.checkout__step {
  width: 100%;
  border-radius: 32px;
  background-color: var(--bg_beige);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.checkout__step-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.checkout__step-title {
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.checkout__step-num {
  color: var(--dark_brown);
}
.checkout__step-header {
  cursor: pointer;
}
.checkout__step-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--olive);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .3s ease-out;
}
.checkout__step-toggle img {
  width: 16px;
  height: 16px;
}
/* open state: + rotates to × */
.checkout__step-toggle {
  transform: rotate(45deg);
}
/* collapsed: + stays as + */
.checkout__step--collapsed .checkout__step-toggle {
  transform: rotate(0deg);
}

/* ── Step body collapse ── */
.checkout__step-body {
  overflow: hidden;
  transition: height .4s ease-out, padding-top .4s ease-out;
  padding-top: 32px;
}

/* ── Step body ── */
.checkout__step-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── Fields ── */
.checkout__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.checkout__field label {
  color: var(--dark);
  font-weight: 600;
}
.checkout__fields-row {
  display: grid;
  gap: 16px;
}
.checkout__fields-row--3 {
  grid-template-columns: repeat(3, 1fr);
}
.checkout__fields-row--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Text input ── */
.checkout__input {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--dark_beige);
  border-radius: 12px;
  background-color: white;
  color: var(--black);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  transition: border-color .2s ease;
}
.checkout__input:focus {
  border-color: var(--olive);
}
.checkout__input::placeholder {
  color: var(--dark_beige);
  font-weight: 400;
}

.checkout__input--error,
.checkout__select--error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 2px rgba(217, 48, 37, 0.08);
}

.checkout__field-error {
  margin: 2px 0 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.checkout__form-error {
  width: 100%;
  margin: 0 0 8px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #f2b8b5;
  background: #fff5f5;
  color: #8a1f1c;
  font-size: 14px;
  font-weight: 600;
}

.checkout__textarea {
  width: 100%;
  min-height: 110px;
  padding: 14px 20px;
  border: 1px solid var(--dark_beige);
  border-radius: 12px;
  background-color: white;
  color: var(--black);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  resize: vertical;
  transition: border-color .2s ease;
}
.checkout__textarea:focus {
  border-color: var(--olive);
}
.checkout__textarea::placeholder {
  color: var(--dark_beige);
  font-weight: 400;
}

.checkout__char-counter {
  margin: 6px 0 0;
  color: var(--dark);
  text-align: right;
}

/* date input icon overlay */
.checkout__date-wrapper {
  position: relative;
}
.checkout__date-wrapper .checkout__input {
  padding-right: 48px;
}
.checkout__date-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.checkout__input-icon {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  width: 20px;
  height: 20px;
}

/* ── Select ── */
.checkout__select {
  width: 100%;
  padding: 14px 20px;
  border: 1px solid var(--dark_beige);
  border-radius: 12px;
  background-color: white;
  color: var(--black);
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  outline: none;
  appearance: none;
  cursor: pointer;
  transition: border-color .2s ease;
}
.checkout__select:focus {
  border-color: var(--olive);
}

/* ── Timeslots ── */
.checkout__timeslots {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.checkout__timeslots--error {
  border: 1px solid #d93025;
  border-radius: 10px;
  padding: 8px;
}

.checkout__timeslots-error {
  margin: 6px 0 0;
  color: #b42318;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}
.checkout__timeslot {
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid var(--dark_beige);
  background-color: white;
  color: var(--black);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all .2s ease;
}
.checkout__timeslot:hover {
  border-color: var(--olive);
  color: var(--olive);
}
.checkout__timeslot.active {
  background-color: var(--olive);
  border-color: var(--olive);
  color: white;
}

/* Unavailable slot (fully booked) */
.checkout__timeslot--unavailable,
.checkout__timeslot:disabled {
  opacity: 0.38;
  cursor: not-allowed;
  pointer-events: none;
}

/* Placeholder / loading text inside timeslots container */
.checkout__slots-hint {
  font-size: 14px;
  font-weight: 400;
  color: var(--dark);
  opacity: 0.5;
  padding: 2px 0;
}

.checkout__slots-hint--loading {
  opacity: 0.6;
}

/* "No availability" suggestion box */
.checkout__next-available {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 18px;
  background: #fff8eb;
  border: 1px solid #f4b400;
  border-radius: 12px;
  margin-top: 4px;
}

.checkout__next-available p {
  font-size: 14px;
  font-weight: 400;
  color: var(--black);
  margin: 0;
}

.checkout__next-available-btn {
  align-self: flex-start;
  padding: 8px 18px;
  border-radius: 8px;
  border: 1.5px solid #f4b400;
  background: transparent;
  color: #7a4300;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.checkout__next-available-btn:hover {
  background: #fff3cc;
}

/* ── Payment methods ── */
.checkout__payment-methods {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.checkout__payment-option {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.checkout__payment-option input[type="radio"] {
  display: none;
}
/* custom radio dot */
.checkout__payment-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--dark_beige);
  background-color: white;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color .2s ease;
}
.checkout__payment-radio::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--olive);
  opacity: 0;
  transition: opacity .2s ease;
}
.checkout__payment-option input[type="radio"]:checked ~ .checkout__payment-radio {
  border-color: var(--olive);
}
.checkout__payment-option input[type="radio"]:checked ~ .checkout__payment-radio::after {
  opacity: 1;
}
/* card */
.checkout__payment-option-inner {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: 12px;
  border: 1px solid var(--dark_beige);
  background-color: white;
  transition: border-color .2s ease;
}
.checkout__payment-option input[type="radio"]:checked ~ .checkout__payment-option-inner {
  border-color: var(--olive);
}
.checkout__payment-option-inner img {
  height: 22px;
  width: auto;
}
.checkout__payment-option-inner:has(.checkout__payment-icons) {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.checkout__payment-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkout__payment-icons img {
  height: 22px;
  width: auto;
  max-width: 52px;
}

/* ═══════════════════════════════════════════════════════════════
   Order success / failed pages
   ═══════════════════════════════════════════════════════════════ */
.order-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* min-height: calc(100vh - 80px); */
  height: 100vh;
  padding: 80px var(--padding-x);
  gap: 0;
  /* max-width: 480px; */
  margin: 0 auto;
}

.order-success__icon-wrap {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: #e8f4ec;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
  flex-shrink: 0;
}

.order-failed__icon-wrap {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: #fdecea;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 48px;
  flex-shrink: 0;
}

.order-success__icon {
  width: 64px;
  height: 64px;
}

.order-success__title {
  margin-bottom: 16px;
  font-size: 28px;
  line-height: 1.25;
}

.order-success__text {
  color: var(--dark);
  margin-bottom: 40px;
  line-height: 1.6;
}

.order-success__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.order-success__actions .button {
  width: 100%;
  justify-content: center;
}

/* ═══════════════════════════════════════════════════════════════
   Mobile (≤768px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .checkout {
    width: 100%;
    padding: 0 16px;
    margin-bottom: 120px;
  }

  .checkout h3 {
    text-align: center;
    margin-bottom: 24px;
  }

  /* ── Step card ── */
  .checkout__step {
    border-radius: 16px;
    padding: 24px 16px;
  }

  .checkout__step-body {
    padding-top: 24px !important;
  }

  .checkout__step-toggle {
    width: 28px;
    height: 28px;
  }

  .checkout__step-toggle img {
    width: 14px;
    height: 14px;
  }

  /* ── Fields ── */
  .checkout__fields-row--3,
  .checkout__fields-row--4 {
    grid-template-columns: 1fr;
  }

  /* ── Inputs ── */
  .checkout__input,
  .checkout__select {
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
  }

  /* ── Timeslots ── */
  .checkout__timeslot {
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 14px;
  }

  /* ── Payment ── */
  .checkout__payment-option-inner {
    padding: 8px 16px;
    border-radius: 4px;
  }
}

/* choose-later checkbox uses .calculator__checkbox-container styles (from calculator.css)
   — only need the margin override here */
#choose-later-wrap {
  margin-top: 16px;
}
