/* BDS referral component only. Bind these tokens to the verified live theme on integration. */
.bds-referral {
  --bds-gold: #e6c779; --bds-ink: #101010; --bds-muted: #bdb8aa;
  --bds-line: #3c372a; --bds-panel: #171612;
  --bds-sheet-limit:77dvh; --bds-sheet-bottom:var(--bds-keyboard-bottom,0px);
  color: #faf7ee; background: var(--bds-ink); border: 1px solid var(--bds-line);
  border-bottom: 0; border-radius: 25px 25px 0 0; padding: 0;
  position: fixed; inset: auto 0 var(--bds-keyboard-bottom, 0px) 0;
  width: min(100%, 520px); max-width: 100%; margin: 0 auto;
  max-height: min(var(--bds-sheet-limit), calc(var(--bds-visible-height, 100dvh) - 12px));
  box-sizing: border-box; overflow: hidden;
  font-family: var(--bds-font, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  box-shadow: 0 -18px 70px #0008; color-scheme: dark;
}
.bds-referral, .bds-referral * { box-sizing: border-box; }
.bds-referral { overflow-wrap:anywhere; text-align:left; }
.bds-referral[open] { display: flex; flex-direction: column; animation: bds-rise .24s ease-out; top:auto; bottom:var(--bds-sheet-bottom); transform:none; max-height:min(var(--bds-sheet-limit),calc(var(--bds-visible-height,100dvh) - 12px)); }
.bds-referral::backdrop { background: rgb(0 0 0 / 52%); }
.bds-referral [hidden] { display: none !important; }
.bds-referral .bds-head { flex-shrink: 0; padding: 8px max(16px,env(safe-area-inset-right)) 4px max(16px,env(safe-area-inset-left)); }
.bds-referral .bds-grip { display: block; width: 36px; height: 4px; border-radius: 9px; background: #686051; margin: 0 auto 4px; }
.bds-referral .bds-topline { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bds-referral .bds-brand { width: 132px; height: 47px; object-fit: contain; display: block; }
.bds-referral .bds-brand-text { font-size: .875rem; letter-spacing: .15em; color: var(--bds-gold); font-weight: 700; }
.bds-referral .bds-close { display: grid; place-items: center; width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; margin: 0; border: 1px solid #494233; background: transparent; border-radius: 50%; color: #f7f1e5; line-height: 1; cursor: pointer; flex: 0 0 44px; appearance: none; -webkit-appearance: none; }
.bds-referral .bds-close svg { display: block; width: 22px; height: 22px; pointer-events: none; }
.bds-referral .bds-scroll { padding: 3px max(16px,env(safe-area-inset-right)) 16px max(16px,env(safe-area-inset-left)); flex:1 1 auto; overflow-y: auto; scroll-padding-block:12px; min-height: 0; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.bds-referral .bds-eyebrow { font-size: .75rem; letter-spacing: .13em; font-weight: 750; color: var(--bds-gold); margin: 4px 0 8px; }
.bds-referral h2 { margin: 0 0 8px; font-family: var(--bds-heading-font, Georgia, serif); font-size: clamp(30px, 7vw, 40px); font-weight: 400; letter-spacing: -.035em; line-height: 1.08; }
.bds-referral .bds-intro { color: #d4cebf; margin: 0 0 11px; font-size: 1rem; line-height: 1.5; }
.bds-referral .bds-offer { padding: 14px; background: var(--bds-panel); border: 1px solid #655434; border-radius: 13px; margin-bottom: 12px; }
.bds-referral .bds-offer-row { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); gap: 10px; align-items: center; }
.bds-referral .bds-offer small { display: block; font-size: .875rem; color: #c9c2b3; line-height: 1.4; }
.bds-referral .bds-offer strong { display: block; color: var(--bds-gold); font-size: 27px; letter-spacing: -.025em; line-height: 1.2; margin-top: 2px; }
.bds-referral .bds-plus { color: var(--bds-gold); font-size: 20px; }
.bds-referral .bds-total { margin: 12px 0 0; padding-top: 10px; border-top: 1px solid #4b402b; font-size: .875rem; font-weight: 750; text-align: center; letter-spacing: .05em; }
.bds-referral .bds-total b { color: var(--bds-gold); font-size: 18px; }
.bds-referral .bds-diamond-offer strong { font-size: 34px; }
.bds-referral .bds-diamond-offer .bds-stack-note { font-size: .875rem; color: #c9c2b3; line-height: 1.45; margin: 10px 0 0; }
.bds-referral form { margin: 0; }
.bds-referral label { display: block; font-size: .875rem; font-weight: 650; margin-bottom: 6px; }
.bds-referral .bds-field { margin: 0 0 12px; }
.bds-referral input { width: 100%; min-height: 49px; border: 1px solid #81755f; border-radius: 9px; padding: 12px 13px; background: #20201c; color: #fffaf0; font: inherit; font-size: max(16px,1rem); line-height: 1.3; }
.bds-referral input::placeholder { color: #b0aa9f; opacity: 1; }
.bds-referral input[aria-invalid="true"] { border-color: #eea6a6; }
.bds-referral .bds-note { color: var(--bds-muted); font-size: .875rem; line-height: 1.5; margin: 6px 0 0; }
.bds-referral .bds-preview-note { border-left: 2px solid var(--bds-gold); padding: 5px 8px; color: #e3d4b3; background: #2a251b; font-size: .875rem; line-height: 1.45; margin: 0 0 12px; }
.bds-referral .bds-terms { margin-top: 8px; }
.bds-referral .bds-terms summary { min-height: 44px; display: flex; align-items: center; color: #ded1b3; font-size: .875rem; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.bds-referral .bds-error { margin: 10px 0 0; padding: 10px; border: 1px solid #9e6262; border-radius: 8px; font-size: .875rem; line-height: 1.4; background: #3a2020; color: #ffdfdf; }
.bds-referral .bds-foot { flex-shrink: 0; padding: 12px max(16px,env(safe-area-inset-right)) calc(9px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left)); border-top: 1px solid var(--bds-line); background: var(--bds-ink); }
.bds-referral .bds-primary { width: 100%; min-height: 50px; padding: 12px 10px; background: var(--bds-gold); border: 1px solid var(--bds-gold); color: #1b170f; font-family: inherit; font-size: .875rem; letter-spacing: .025em; font-weight: 800; border-radius: 9px; cursor: pointer; line-height: 1.5; }
.bds-referral .bds-primary:disabled { opacity: .65; cursor: wait; }
.bds-referral .bds-skip { width: 100%; min-height: 44px; border: 0; background: transparent; color: #d6cfbf; font: inherit; font-size: .875rem; cursor: pointer; }
.bds-referral :focus-visible { outline: 2px solid #f4d995; outline-offset: 3px; }
.bds-referral .bds-success-icon { display: grid; place-items: center; width: 54px; height: 54px; border: 1px solid var(--bds-gold); border-radius: 50%; font-size: 24px; color: var(--bds-gold); margin: 10px 0 18px; }
.bds-referral .bds-success p { font-size: 1rem; line-height: 1.6; color: #d6cfbf; }
@media (min-width: 650px) {
  .bds-referral { --bds-sheet-bottom:max(20px,var(--bds-keyboard-bottom,0px)); --bds-sheet-limit:min(88dvh,820px); border-bottom: 1px solid var(--bds-line); border-radius: 24px; }
}
@media (max-height: 520px) { .bds-referral { --bds-sheet-bottom:var(--bds-keyboard-bottom,0px); --bds-sheet-limit:calc(var(--bds-visible-height,100dvh) - 12px); } .bds-referral .bds-head { padding-top: 6px; } }
@keyframes bds-rise { from { transform: translateY(35px); opacity: .4; } to { transform: translateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bds-referral[open] { animation: none; } }

/* Make room for the form when the actual visual viewport shrinks for a keyboard. */
.bds-referral[data-compact="true"] { --bds-sheet-limit:calc(var(--bds-visible-height,100dvh) - 12px); --bds-sheet-bottom:var(--bds-keyboard-bottom,0px); }
.bds-referral[data-compact="true"] .bds-grip { display:none; }
.bds-referral[data-compact="true"] .bds-head { padding-top:4px; }
.bds-referral[data-compact="true"] .bds-brand { height:36px; }
.bds-referral[data-compact="true"] .bds-foot { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:8px; padding-top:8px; padding-bottom:calc(8px + env(safe-area-inset-bottom)); max-height:calc(var(--bds-visible-height,100dvh) * .4); overflow:auto; }
.bds-referral[data-compact="true"] .bds-continue { grid-column:1 / -1; }
.bds-referral[data-compact="true"] .bds-primary, .bds-referral[data-compact="true"] .bds-skip { min-height:44px; padding:8px; }
.bds-referral input, .bds-referral .bds-error { scroll-margin-block:12px; }
.bds-referral .bds-primary, .bds-referral .bds-skip { white-space:normal; overflow-wrap:anywhere; }
