/* Block `checkout`: layout only - colours, radii and shadows are the theme's (see _styles.pug). */
.checkout__card {
  /* Stripe draws the card field inside this box */
  min-height: 2.5rem;
  padding-top: 0.6rem;
}

.checkout__express-button {
  min-height: 2.5rem;
}

/* the gift area (modules/checkout/giftInput.js): in the cart block and in this one */
.gift-box__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
/* the quick amounts: Bootstrap's own button variables, from the theme's choice roles
   (custom_purple.css) - rest, under the pointer, selected; the price stays white-on-fill */
.gift-box .amount {
  --bs-btn-color: var(--choice-text);
  --bs-btn-bg: var(--choice-bg);
  --bs-btn-border-color: var(--choice-border);
  --bs-btn-hover-color: var(--choice-text-on);
  --bs-btn-hover-bg: var(--choice-bg-hover);
  --bs-btn-hover-border-color: var(--choice-bg-hover);
  --bs-btn-active-color: var(--choice-text-on);
  --bs-btn-active-bg: var(--choice-bg-selected);
  --bs-btn-active-border-color: var(--choice-bg-selected);
  --bs-btn-focus-shadow-rgb: var(--brand-primary-rgb);
  font-weight: 600;
}

/* selected stays selected under the pointer */
.gift-box .amount.active,
.gift-box .amount.active:hover {
  color: var(--choice-text-on);
  background-color: var(--choice-bg-selected);
  border-color: var(--choice-bg-selected);
}

.gift-box .amounts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.25rem, 1fr));
  gap: 0.5rem;
  margin: 0.5rem 0;
}

/* the gift's "Make it recurring" row: the switch, then how often once it is on */
.gift-box__repeat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.gift-box__repeat .form-select {
  width: auto;
  min-width: 8rem;
}

/* ---------- who is giving ---------- */
.checkout__pay {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.acct {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius-lg);
  background: var(--card-bg-raised);
}
.acct[hidden] { display: none; }

.acct__avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--brand-primary);
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
}
.acct__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.acct__avatar--guest {
  background: var(--brand-primary-soft);
  color: var(--brand-primary);
}

.acct__text {
  flex: 1;
  min-width: 0;
}
.acct__name {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct__sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct__action {
  flex: none;
  text-decoration: none;
}

/* ---------- saved methods ---------- */
.checkout__methods {
  margin: 0;
  padding: 0;
  border: 0;
}
.pay-legend {
  float: none;
  width: auto;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.pay-methods {
  container: pay-methods / inline-size;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.method {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--bs-border-radius-lg);
  cursor: pointer;
  transition: border-color 0.15s, background-color 0.15s;
}
.method:hover {
  border-color: var(--choice-bg-hover);
}
.method.is-active {
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
}
/* the real radio stays for keyboards and screen readers; the dot draws it */
.method input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.method:has(input:focus-visible) {
  box-shadow: 0 0 0 0.2rem var(--brand-primary-soft);
}

.method__dot {
  flex: none;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid var(--border-color);
}
.method.is-active .method__dot {
  border: 5px solid var(--brand-primary);
}

.method__brand {
  flex: none;
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  height: 1.75rem;
  padding: 0 0.35rem;
  border-radius: var(--bs-border-radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text-heading);
}
.method__brand--plus {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-primary);
}

.method__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.method__text b {
  font-weight: 600;
}
.method__text small {
  color: var(--text-secondary);
}

/* the tag sits at the right; in a narrow list it moves beneath the brand so it never squeezes the text */
.method__mark {
  display: contents;
}
@container pay-methods (width < 300px) {
  .method__mark {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
  }
}
.method__tag {
  flex: none;
  order: 1;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--card-bg-raised);
  color: var(--text-secondary);
  font-size: 0.65rem;
  font-weight: 600;
  line-height: 1.3;
}

/* ---------- a new card, a guest's details ---------- */
.checkout__new,
.js-guest-fields {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.checkout__new[hidden],
.js-guest-fields[hidden] { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
}
.field[hidden] { display: none; }
.field > span {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* ---------- give as ---------- */
.giveas {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}


/* signed in: just the card that will be charged, until "Change" opens the list */
.method--chosen {
  cursor: default;
  border-color: var(--brand-primary);
  background: var(--brand-primary-soft);
}
.method--chosen:hover {
  border-color: var(--brand-primary);
}
.method__change {
  flex: none;
  text-decoration: none;
}

/* the buyer's confirmation (./confirmation.js): one column, the order as sold.
   Layout only - colours from the theme's tokens. */
.confirm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem 0;
}

.confirm__check {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: rgba(var(--brand-success-rgb), 0.18);
  border: 3px solid var(--brand-success);
  color: var(--brand-success);
  font-size: 1.4rem;
}

.confirm__title {
  text-align: center;
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-title);
  margin: 0;
}

.confirm__number,
.confirm__message,
.confirm__sub {
  text-align: center;
  color: var(--text-secondary);
  margin: -0.5rem 0 0;
}

.confirm__rule {
  align-self: center;
  width: 30%;
  margin: 0.25rem 0;
  border: 0;
  border-top: 3px solid var(--border-color);
  opacity: 1;
}

.confirm__lines {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.confirm__line {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--card-radius);
  background: var(--card-bg-raised);
}

.confirm__image {
  width: 5rem;
  height: 5rem;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--media-radius);
  background: var(--bg-tertiary);
}

.confirm__image--none {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 1.5rem;
}

.confirm__line-body {
  min-width: 0;
}

.confirm__line-title {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-heading);
  overflow-wrap: anywhere;
}

.confirm__line-detail,
.confirm__muted {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.confirm__partial {
  margin: 0;
  font-size: 0.875rem;
  color: var(--brand-warning);
}

.confirm__row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
}

.confirm__icon {
  width: 2rem;
  flex-shrink: 0;
  text-align: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
}

.confirm__strong {
  font-weight: 600;
  color: var(--text-heading);
}

.confirm__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.confirm__link {
  color: var(--text-secondary);
  text-decoration: underline;
}

.confirm__again {
  color: var(--text-tertiary);
}
