/* Bank Alkair — the payment step shared by the cart, the project page and the zakat calculator: the
 * donor fields and the folded donor details of a direct "donate now". Every value comes from
 * tokens.css (--s-*). The fields follow the width of their own box, not the screen. */

.donor-fields { container: donor / inline-size; display: grid; gap: var(--s-space-4); min-width: 0; }
.donor-pair, .donate-phone { display: grid; gap: var(--s-space-4); grid-template-columns: minmax(0, 1fr); }
.donate-phone { gap: var(--s-space-2); }
@container donor (min-width: 520px) {
  .donor-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container donor (min-width: 300px) {
  .donate-phone { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.field-flag { font-size: var(--s-text-xs); font-weight: var(--s-weight-body); color: var(--s-muted); }

/* ---------- The phone country: a search box over its list ---------- */
.country-pick { position: relative; min-width: 0; }
.country-pick-list { position: absolute; inset-inline: 0; top: calc(100% + var(--s-space-1)); z-index: var(--s-z-dropdown); margin: 0; padding: var(--s-space-1); list-style: none; max-height: var(--s-picker-max-h); overflow-y: auto; background: var(--s-card-bg); color: var(--s-text); border: var(--s-hairline) solid var(--s-border); border-radius: var(--s-radius); box-shadow: var(--s-shadow-lg); }
.country-pick-list li { display: flex; justify-content: space-between; gap: var(--s-space-2); padding: var(--s-space-2) var(--s-space-3); border-radius: var(--s-radius-sm); cursor: pointer; }
.country-pick-list li[aria-selected="true"], .country-pick-list li:hover { background: var(--s-primary-light); color: var(--s-primary-dark-text); }
.country-pick-list .country-dial { direction: ltr; color: var(--s-muted); font-family: var(--s-font-num); }
.country-pick-list .country-none { cursor: default; color: var(--s-muted); }
.field-flag.is-required { color: var(--s-error); }

/* ---------- Donor details of a direct "donate now" ---------- */
.pay-donor { border: var(--s-hairline) solid var(--s-border); border-radius: var(--s-radius); background: var(--s-page-bg); color: var(--s-text); }
.pay-donor[open] { background: var(--s-card-bg); }
.pay-donor-toggle { list-style: none; min-height: var(--s-touch); padding: 0 var(--s-space-4); display: flex; align-items: center; gap: var(--s-space-2); cursor: pointer; font-weight: var(--s-weight-label); }
.pay-donor-toggle::-webkit-details-marker { display: none; }
.pay-donor-toggle > span:first-of-type { flex: 1; min-width: 0; }
.pay-donor-icon { transition: transform var(--s-fast) var(--s-ease); }
.pay-donor[open] .pay-donor-icon { transform: rotate(180deg); }
.pay-donor .donor-fields { padding: 0 var(--s-space-4) var(--s-space-4); }
.pay-note { margin: 0; display: flex; gap: var(--s-space-2); align-items: flex-start; font-size: var(--s-text-xs); color: var(--s-muted); }
.pay-note .icon { flex: none; margin-top: var(--s-space-1); }

/* ---------- The step of the payment method (review 2026-10-31, step 10d, decision 18) ----------
 * The icons of the methods the owner shows, then the area the gateway's frame fills. It is drawn inside the
 * project box, the zakat result and the cart's summary, and in the window of the quick donation. */
.pay-step { display: grid; gap: var(--s-space-4); min-width: 0; }
.pay-step-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-space-3); flex-wrap: wrap; }
.pay-step-summary { min-width: 0; overflow-wrap: anywhere; }
.pay-step-edit { appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; color: var(--s-link); font: inherit; font-weight: var(--s-weight-label); text-decoration: underline; cursor: pointer; }
.pay-step-title { margin: 0; font-size: var(--s-text-md); }
.pay-step-note, .pay-step-error { margin: 0; font-size: var(--s-text-sm); }
.pay-step-error { color: var(--s-error); font-weight: var(--s-weight-label); }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--s-touch) * 2), 1fr)); gap: var(--s-space-3); }
.pay-method { min-height: var(--s-touch); display: grid; place-items: center; padding: var(--s-space-2) var(--s-space-3); border: var(--s-hairline) solid var(--s-border); border-radius: var(--s-radius); background: var(--s-card-bg); color: var(--s-text); font: inherit; font-size: var(--s-text-sm); font-weight: var(--s-weight-label); cursor: pointer; transition: border-color var(--s-fast) var(--s-ease), box-shadow var(--s-fast) var(--s-ease); }
.pay-method:hover { border-color: var(--s-primary); }
.pay-method:focus-visible { outline: var(--s-focus-w) solid var(--s-focus); outline-offset: var(--s-border-w); }
.pay-method img { display: block; max-width: 100%; max-height: calc(var(--s-touch) - var(--s-space-3)); width: auto; height: auto; object-fit: contain; }
.pay-method[disabled] { opacity: var(--s-opacity-disabled); cursor: not-allowed; }
.pay-step.is-busy { cursor: progress; }
.pay-frame { min-width: 0; }
/* The window of the quick donation. */
.pay-modal { position: fixed; inset: 0; z-index: var(--s-z-modal); display: grid; place-items: center; padding: var(--s-space-4); background: var(--s-overlay-strong); overflow-y: auto; }
.pay-modal[hidden] { display: none; }
.pay-modal-card { width: min(100%, calc(var(--s-touch) * 10)); max-height: 100%; overflow-y: auto; display: grid; gap: var(--s-space-4); padding: var(--s-space-5); border-radius: var(--s-radius-lg); background: var(--s-card-bg); color: var(--s-text); box-shadow: var(--s-shadow-lg); }
.pay-modal-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-space-3); }
.pay-modal-title { margin: 0; font-size: var(--s-text-card-title); overflow-wrap: anywhere; }
.pay-modal-close { flex: none; width: var(--s-touch); height: var(--s-touch); display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--s-text); cursor: pointer; }
.pay-modal-close:hover { background: var(--s-primary-light); }
.pay-modal-close:focus-visible { outline: var(--s-focus-w) solid var(--s-focus); outline-offset: var(--s-border-w); }
