/* Pills.module.css -> .pill__ */
.pill__pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: var(--r-pill);
  font-weight: 700;
  white-space: nowrap;
}

.pill__dot {
  flex: none;
  border-radius: 50%;
}

/* QrGrid.module.css -> .qr__ */
.qr__panel {
  flex: none;
  background: #fff;
  /* Keep the code crisp when the card is scaled up for printing. */
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.qr__grid {
  display: grid;
}

.qr__dark {
  background: var(--qr-dark);
}

/* Modal.module.css -> .modal__ */
.modal__overlay {
  position: fixed;
  inset: 0;
  background: rgba(12, 43, 45, 0.45);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
  animation: acFade 0.2s ease;
}

.modal__dialog {
  max-width: 94vw;
  max-height: 94vh;
  overflow: auto;
  border-radius: 20px;
  animation: acPop 0.25s ease;
  box-shadow: var(--shadow-modal);
}

.modal__dialog:focus {
  outline: none;
}

/* Toast.module.css -> .toast__ */
.toast__toast {
  display: flex;
  align-items: center;
  gap: 11px;
  background: var(--sidebar-bg);
  color: #fff;
  padding: 13px 20px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-toast);
  /* Self-dismissing in CSS, so it works with JavaScript disabled too. The
     2800ms delay is the prototype's TOAST_MS. */
  animation: acRise 0.25s ease, acToastOut 0.4s ease 2800ms forwards;
}

.toast__badge {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 50%;
  background: var(--wa-green);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

/* WhatsAppModal.module.css -> .wa__ */
/* Width/background/grid for the shared <Modal> surface. */
.wa__dialog {
  width: 780px;
  background: var(--card-bg);
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px 1fr;
}

/* ---- phone preview (WhatsApp's own palette, hence the raw hex) ---- */
.wa__preview {
  background: #0b141a;
  padding: 18px;
  display: flex;
  flex-direction: column;
}

.wa__chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
}

.wa__chat-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
}

.wa__chat-status {
  font-size: 11px;
  color: #7e9b91;
}

.wa__chat-surface {
  flex: 1;
  background: #0e1c1a;
  border-radius: 12px;
  padding: 14px;
  min-height: 300px;
  background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 14px 14px;
}

/* Outgoing bubble: `margin-left:auto` + `max-width` right-aligns the block. */
.wa__bubble {
  margin-left: auto;
  max-width: 88%;
  background: #005c4b;
  color: #e9fff5;
  padding: 9px 12px 7px;
  border-radius: 10px 10px 2px 10px;
  font-size: 12.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.wa__bubble-meta {
  text-align: right;
  font-size: 9.5px;
  color: #86c5b3;
  margin-top: 4px;
}

/* ---- composer ---- */
.wa__composer {
  padding: 24px;
}

.wa__composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.wa__close {
  width: 34px;
  height: 34px;
  border: 0;
  background: var(--border-faint);
  border-radius: var(--r-icon-btn);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}

.wa__recipient {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--text-muted);
}

.wa__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.wa__chip {
  height: 32px;
  padding: 0 13px;
  background: #eef6f4;
  color: #1f6e5e;
  border: 1px solid #d7eae4;
  border-radius: var(--r-chip);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.wa__chip:hover {
  background: #e0efeb;
}

.wa__textarea {
  width: 100%;
  height: 150px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border-control);
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.5;
  resize: none;
  background: var(--input-bg);
  color: var(--text);
}

.wa__textarea:focus {
  border-color: var(--wa-green);
  background: var(--card-bg);
}

.wa__send {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  height: 46px;
  margin-top: 14px;
  background: var(--wa-green);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.wa__send:hover {
  background: var(--wa-green-hover);
}

/* LoyaltyCardModal.module.css -> .lc__ */
.lc__dialog {
  width: 540px;
  background: #f4f8f8;
  padding: 28px;
}

/* ---- header ---- */
.lc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.lc__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.lc__subtitle {
  margin: 4px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
}

.lc__close-button {
  width: 34px;
  height: 34px;
  flex: none;
  border: 0;
  background: #e7eeee;
  border-radius: var(--r-icon-btn);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-soft);
}

/* ---- the card ---- */
/**
 * Block flow, as in the design: the body row sits 30px under the header and the
 * fixed credit-card ratio leaves the remaining slack at the bottom of the card.
 */
.lc__card {
  position: relative;
  aspect-ratio: 1.586 / 1;
  border-radius: var(--r-card-lg);
  padding: 26px;
  color: #fff;
  overflow: hidden;
  background: var(--grad-rewards);
  box-shadow: var(--shadow-rewards-lg);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.lc__ring-top {
  position: absolute;
  right: -50px;
  top: -50px;
  width: 190px;
  height: 190px;
  border: 22px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.lc__ring-bottom {
  position: absolute;
  left: -30px;
  bottom: -60px;
  width: 140px;
  height: 140px;
  border: 18px solid rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.lc__card-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lc__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lc__brand-mark {
  position: relative;
  width: 30px;
  height: 30px;
  flex: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: var(--r-icon-btn);
}

.lc__brand-cross-h,
.lc__brand-cross-v {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 2px;
}

.lc__brand-cross-h {
  width: 14px;
  height: 4px;
}

.lc__brand-cross-v {
  width: 4px;
  height: 14px;
}

.lc__brand-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.lc__brand-sub {
  display: block;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--on-gradient-muted);
  margin-top: 2px;
}

.lc__programme {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--on-gradient-muted);
}

/* ---- card body ---- */
.lc__card-body {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-top: 30px;
}

.lc__member {
  min-width: 0;
}

.lc__member-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--on-gradient-muted);
}

.lc__member-name {
  font-size: 21px;
  font-weight: 800;
  margin-top: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lc__member-id {
  font-size: 12px;
  color: var(--on-gradient-mono);
  font-family: var(--font-mono);
  margin-top: 10px;
}

.lc__tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 5px 11px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
}

.lc__tier-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
}

.lc__qr {
  flex: none;
  text-align: center;
}

.lc__qr-caption {
  font-size: 9px;
  color: var(--on-gradient-muted);
  margin-top: 7px;
  letter-spacing: 0.04em;
}

/* ---- footer ---- */
.lc__footer {
  display: flex;
  gap: 11px;
  margin-top: 22px;
}

.lc__close-action {
  flex: 1;
  height: 46px;
  background: #fff;
  color: var(--text-secondary);
  border: 1px solid var(--border-control);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.lc__print-action {
  flex: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 46px;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.lc__print-action:hover {
  background: var(--teal-hover);
}

/* LoyaltyCardPreview.module.css -> .lp__ */
.lp__card {
  position: relative;
  border-radius: var(--r-card-lg);
  padding: 24px;
  color: #fff;
  overflow: hidden;
  background: var(--grad-rewards);
  box-shadow: var(--shadow-rewards);
}

/* Decorative hoop bleeding off the top-right corner. */
.lp__ring {
  position: absolute;
  right: -40px;
  top: -40px;
  width: 150px;
  height: 150px;
  border: 18px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
}

.lp__header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lp__brand {
  display: flex;
  align-items: center;
  gap: 9px;
}

.lp__mark {
  position: relative;
  width: 26px;
  height: 26px;
  flex: none;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 8px;
}

.lp__cross-h,
.lp__cross-v {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 2px;
}

.lp__cross-h {
  width: 12px;
  height: 3.5px;
}

.lp__cross-v {
  width: 3.5px;
  height: 12px;
}

.lp__brand-name {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.lp__kicker {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--on-gradient-muted);
}

.lp__body {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
}

.lp__meta {
  min-width: 0;
}

.lp__member-label {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--on-gradient-muted);
}

.lp__name {
  font-size: 18px;
  font-weight: 800;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lp__member-id {
  font-size: 11.5px;
  color: var(--on-gradient-mono);
  font-family: var(--font-mono);
  margin-top: 8px;
}

.lp__tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
}

.lp__tier-dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
}


/* The user chip is a logout submit button; Django 6 requires POST. The form
   generates no box, so the chip stays the flex item it was and keeps its own
   `margin-top:auto`. */
.sb__user-form {
  display: contents;
}

.sb__user-chip {
  border: 0;
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

/* ---- form primitives -------------------------------------------------
 * Shared by the intake wizard, the pharmacy forms, the settings forms and
 * the login screen. They live in the always-loaded bundle because only the
 * wizard loaded wizard.css -- every other form was falling back to browser
 * defaults, with the label inline beside an unstyled box.
 */
.ap__label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.ap__required {
  color: var(--required);
}

select.ap__input {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.ap__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--border-control);
  border-radius: var(--r-control);
  font-size: 14px;
  background: var(--input-bg);
  color: var(--text);
}

.ap__input:focus {
  border-color: var(--teal);
  background: #fff;
}

.ap__date-input {
  color: var(--text-secondary);
}

.ap__textarea {
  height: 80px;
  padding: 12px 14px;
  resize: none;
}

/* ---- segmented choices (gender, tier) ---- */
.ap__segmented {
  display: flex;
  gap: 8px;
}

.ap__segment {
  flex: 1;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1.5px solid var(--border-control);
  background: var(--input-bg);
  color: var(--text-muted);
  border-radius: var(--r-control);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.ap__segment-on {
  background: var(--teal-soft-bg);
  color: var(--teal);
  border-color: var(--teal);
}

.ap__tier-dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 50%;
}

/* ---- consent ---- */
.ap__consent {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #f4faf9;
  border: 1px solid var(--border-consent);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
}

/* Native checkbox kept in the tab order but out of sight; .ap__consent-box is the
   visible control. */
.ap__consent-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ap__consent-box {
  width: 22px;
  height: 22px;
  flex: none;
  border-radius: 6px;
  border: 1.5px solid #c4d3d3;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.ap__consent-input:focus-visible + .ap__consent-box {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.ap__consent-text {
  font-size: 13px;
  color: var(--text-secondary);
}

.ap__consent-strong {
  color: var(--text);
}

/* The design has no error state; this is the minimum needed to show one. */
.ap__error {
  margin: 6px 0 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--required);
}

.ap__input[aria-invalid="true"] {
  border-color: var(--required);
}

/**
 * Real radios behind styled labels, so the selected state needs no JavaScript.
 * Gender takes the teal treatment; a tier takes its own colours, which is why
 * this cannot be one rule.
 */
.ap__segment:not([data-tier]):has(input:checked) {
  background: var(--teal-soft-bg);
  color: var(--teal);
  border-color: var(--teal);
}

.ap__segment[data-tier="Bronze"]:has(input:checked) {
  background: #f4ece2;
  color: #8a6845;
  border-color: #bd8c52;
}

.ap__segment[data-tier="Silver"]:has(input:checked) {
  background: #eef1f3;
  color: #5f7078;
  border-color: #9aa7ad;
}

.ap__segment[data-tier="Gold"]:has(input:checked) {
  background: #fbf3da;
  color: #9a7b1f;
  border-color: #d7b03a;
}

.ap__segment {
  cursor: pointer;
}

.ap__consent-box::after {
  content: "";
  width: 11px;
  height: 6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg) translate(1px, -1px);
  opacity: 0;
}

.ap__consent:has(input:checked) .ap__consent-box {
  background: var(--teal);
  border-color: var(--teal);
}

.ap__consent:has(input:checked) .ap__consent-box::after {
  opacity: 1;
}

.ap__consent-box-on {
  background: var(--teal);
  border-color: var(--teal);
}

