/* Affiliates (S31): the design system's QrBlock (O-32, O-23), O-32's list, page and form, and O-19's commission line.
   The list rows and the form parts are promo.css's and apartments.css's. */

/* QrBlock (bundle.css): the code in ink on a card, with a quiet zone of 4 modules, at least 160 px wide. From 768 px
   it is open; on phones it sits behind "Show QR code", a <details>. */
.bh-qr { display: grid; gap: var(--space-3); justify-items: start; margin: 0; }
.bh-qr-code { display: grid; place-items: center; width: 200px; max-width: 100%; aspect-ratio: 1; padding: var(--space-2); border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--card); color: var(--ink-1); }
.bh-qr-code svg { display: block; width: 100%; height: 100%; }
.bh-qr-caption { max-width: 32ch; color: var(--ink-2); font-size: var(--text-small); line-height: var(--leading-small); }
.bh-qrblock-wide { display: none; }
.bh-qrblock-phone > summary { list-style: none; }
.bh-qrblock-phone > summary::-webkit-details-marker { display: none; }
.bh-qrblock-phone[open] > summary { margin-bottom: var(--space-3); }
.bh-qrblock-phone:not([open]) .bh-qrblock-hide, .bh-qrblock-phone[open] .bh-qrblock-show { display: none; }
@media (min-width: 768px) {
  .bh-qrblock-phone { display: none; }
  .bh-qrblock-wide { display: block; }
}

/* O-32: the empty page, what the Owner owes, and a row's figures */
.bh-af-empty { display: grid; gap: var(--space-3); justify-items: center; padding: var(--space-8) var(--space-4); text-align: center; }
.bh-af-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: var(--radius-pill); background: var(--primary-soft); color: var(--primary); }
.bh-af-owe { display: flex; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-card); background: var(--warning-bg); }
.bh-af-owe > .bh-icon { flex: none; margin-top: 2px; color: var(--warning-ink); }
.bh-af-owe-body { display: grid; gap: var(--space-1); min-width: 0; }
.bh-af-owe-title { color: var(--warning-ink); font-size: var(--text-h3); line-height: var(--leading-h3); font-weight: var(--weight-bold); }
.bh-af-code { color: var(--ink-1); overflow-wrap: anywhere; }
.bh-af-figures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2) var(--space-3); margin-top: var(--space-2); }
.bh-af-figures > span { display: grid; }
.bh-af-figures .is-owed, .bh-af-figures .is-owed > .bh-muted, .bh-af-totals .is-owed, .bh-af-owed-text { color: var(--warning-ink); }

/* O-32, one affiliate: the commission card, a link with its QR code, the code, and the bookings */
.bh-af-card { display: grid; gap: var(--space-3); min-width: 0; }
.bh-af-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2); margin: 0; }
.bh-af-totals > div { display: grid; gap: var(--space-1); padding: var(--space-3); border-radius: var(--radius-control); background: var(--sunken); }
.bh-af-totals dt { color: var(--ink-2); font-size: var(--text-small); line-height: var(--leading-small); }
.bh-af-totals .is-owed > dt { color: var(--warning-ink); font-weight: var(--weight-bold); }
.bh-af-totals dd { margin: 0; font-weight: var(--weight-bold); overflow-wrap: anywhere; }
.bh-af-owed { display: grid; gap: var(--space-2); justify-items: start; padding: var(--space-4); border-radius: var(--radius-card); background: var(--warning-bg); }
.bh-af-pay > summary { list-style: none; }
.bh-af-pay > summary::-webkit-details-marker { display: none; }
.bh-af-confirm { display: grid; gap: var(--space-3); justify-items: start; margin-top: var(--space-3); }
.bh-af-url { font-family: var(--font-mono); font-size: var(--text-small); line-height: var(--leading-small); overflow-wrap: anywhere; }
.bh-af-copy { justify-self: start; }
.bh-af-copy.is-copied { border-color: var(--success-ink); color: var(--success-ink); }
.bh-af-codeline { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-4); border-radius: var(--radius-card); background: var(--sunken); }
.bh-af-bookings { display: grid; gap: var(--space-3); }
.bh-af-row-head { display: flex; justify-content: space-between; gap: var(--space-3); }

/* O-32's form */
.bh-af-percent { display: flex; align-items: center; gap: var(--space-3); }
.bh-af-percent > .bh-input { flex: none; width: 96px; }
.bh-af-how { display: grid; gap: var(--space-2); padding-left: var(--space-5); list-style: decimal; }

/* O-19: the commission line, at the end of the money card */
.bh-af-o19 { display: grid; gap: var(--space-2); justify-items: start; margin: var(--space-4) 0; padding-top: var(--space-4); border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.bh-af-o19 > * { margin: 0; }
