/* Quiet purchase motion; the API and purchase state stay authoritative. */
.b7-buy-sheet[open],.b7-buy-sheet[open] .b7-buy-product{animation:none!important}
.b7-buy-loading .b7-buy-now{opacity:1!important;position:relative}
.b7-buy-loading .b7-buy-now::before{content:"";display:inline-block;width:10px;height:10px;margin-right:7px;border:1.5px solid #ffffff60;border-top-color:#fff;border-radius:50%;vertical-align:-1px;animation:b7-purchase-spin .8s linear infinite}
.b7-buy-feedback[hidden]{display:none}
.b7-added-card{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:10px;padding:12px;border:1px solid #dfe9e6;border-radius:14px;background:#f6faf8;margin:2px 0 12px;color:#526b65;text-align:left}
.b7-added-card>img{width:44px;height:52px;object-fit:cover;border-radius:8px}
.b7-added-copy{min-width:0;display:flex;flex-direction:column;gap:3px;line-height:1.5}
.b7-added-copy strong{font-size:11px;font-weight:600}.b7-added-copy span{font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.b7-added-copy small{font-size:10px;color:#7c8984;overflow-wrap:anywhere}
.b7-added-bag{font:inherit;font-size:10px;white-space:nowrap;min-height:36px;padding:7px 10px;border:1px solid #c8d8d1;border-radius:18px;background:#fff;color:#526b65;cursor:pointer}
.b7-added-bag:focus-visible{outline:2px solid #71988d;outline-offset:3px}
#checkout-layout:not([hidden]){animation:b7-checkout-arrive 240ms cubic-bezier(.2,.65,.3,1)}
@keyframes b7-purchase-spin{to{transform:rotate(360deg)}}
@keyframes b7-checkout-arrive{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:350px){.b7-added-card{grid-template-columns:38px minmax(0,1fr)}.b7-added-card>img{width:38px;height:46px}.b7-added-bag{grid-column:2;justify-self:start}}
@media(prefers-reduced-motion:reduce){.b7-buy-loading .b7-buy-now::before,#checkout-layout:not([hidden]){animation:none}}

/* Fit short selections to their content; long lists keep a fixed footer. */
.b7-buy-product{height:auto;max-height:var(--b7-sheet-max-height,86dvh)}
.b7-buy-scroll{flex:0 1 auto;padding:16px}
.b7-buy-header{padding:12px 16px 10px}
.b7-buy-summary{gap:12px;margin-bottom:16px}
.b7-buy-summary>img{width:82px;height:82px}
.b7-buy-group{margin-bottom:16px}
.b7-buy-group legend{margin-bottom:8px}
.b7-buy-quantity{margin-bottom:2px}
.b7-buy-footer{padding:10px 16px calc(12px + env(safe-area-inset-bottom,0px))}

/* Let choice cards keep their image and text height inside the scroll area. */
.b7-buy-options.b7-buy-illustrated{grid-template-columns:repeat(auto-fill,minmax(92px,1fr));grid-auto-rows:max-content;align-content:start;align-items:stretch}
.b7-buy-choice img{display:block;flex:0 0 auto;min-height:0}
.b7-buy-choice span{flex:none;white-space:normal;word-break:normal;overflow-wrap:anywhere}
.b7-buy-details{display:inline-block;margin-top:6px;padding:4px 0;border:0;background:none;color:inherit;font:inherit;font-size:11px;text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.b7-picker-cards{grid-auto-rows:max-content;align-content:start}
.b7-picker-cards img,.b7-picker-cards .b7-picker-option-copy{flex:none}
