/* «به سبد خرید اضافه شد» popup (static/js/marketplace/buy-box.js). */
dialog.bbca { position: fixed; inset: 0; width: min(440px, calc(100vw - 24px)); height: fit-content; max-height: calc(100dvh - 32px); margin: auto; padding: 0; overflow: hidden; color: #1f2937; background: #fff; border: 0; border-radius: 18px; box-shadow: 0 24px 60px rgba(16, 24, 40, .22); font-family: Estedad, Tahoma, sans-serif; direction: rtl; }
dialog.bbca::backdrop { background: rgba(16, 24, 40, .55); }
dialog.bbca[open] { animation: bbca-in .22s ease-out; }
@keyframes bbca-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.bbca *, .bbca *::before, .bbca *::after { box-sizing: border-box; font-weight: 400; }
.bbca-box { position: relative; padding: 22px 24px 22px; }
/* Fading rings behind the icon, as on the cart and payment pages. */
.bbca-rings { position: absolute; top: -70px; right: -70px; width: 260px; height: 260px; pointer-events: none; border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 39px, rgba(6, 118, 71, .07) 39px 40px); -webkit-mask-image: radial-gradient(circle, #000 30%, transparent 70%); mask-image: radial-gradient(circle, #000 30%, transparent 70%); }
.bbca-head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.bbca-icon { display: grid; place-items: center; width: 52px; height: 52px; color: #067647; background: #ecfdf3; border: 1px solid #d1fadf; border-radius: 50%; animation: bbca-pop .4s cubic-bezier(.2, .9, .3, 1.3) both; }
@keyframes bbca-pop { from { transform: scale(.6); opacity: 0; } }
.bbca-close { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; color: #667085; background: none; border: 0; border-radius: 10px; cursor: pointer; }
.bbca-close:hover { color: #111827; background: #f2f4f7; }
.bbca-close:focus-visible, .bbca-btn:focus-visible { outline: 2px solid #fca5a5; outline-offset: 2px; }
.bbca-title { position: relative; margin: 0 0 6px; font-size: 18px; line-height: 1.7; color: #111827; }
.bbca-text { position: relative; margin: 0 0 16px; font-size: 15px; line-height: 1.9; color: #475467; }
.bbca-item { position: relative; display: flex; align-items: center; gap: 12px; margin-bottom: 22px; padding: 10px; background: #f9fafb; border: 1px solid #f2f4f7; border-radius: 12px; }
.bbca-thumb { flex: none; width: 56px; height: 56px; overflow: hidden; background: #eaecf0; border-radius: 10px; }
.bbca-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.bbca-copy { display: grid; gap: 2px; min-width: 0; }
.bbca-name { overflow: hidden; font-size: 14px; line-height: 1.8; color: #111827; white-space: nowrap; text-overflow: ellipsis; }
.bbca-meta { font-size: 13px; color: #667085; }
.bbca-foot { position: relative; display: flex; gap: 12px; }
.bbca-btn { display: flex; flex: 1 1 0; align-items: center; justify-content: center; min-height: 48px; padding: 0 16px; font: inherit; font-size: 16px; color: #fff; text-decoration: none; background: #dc2626; border: 1px solid #dc2626; border-radius: 10px; cursor: pointer; }
.bbca-btn:hover { background: #b91c1c; border-color: #b91c1c; }
.bbca-btn.is-outline { color: #344054; background: #fff; border-color: #d0d5dd; }
.bbca-btn.is-outline:hover { background: #f9fafb; border-color: #d0d5dd; }

/* Phones: a sheet fixed to the bottom of the screen. */
@media (max-width: 560px) {
    dialog.bbca { inset: auto 0 0 0; width: auto; max-width: none; max-height: 88dvh; margin: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px rgba(16, 24, 40, .18); }
    dialog.bbca[open] { animation: bbca-sheet .25s ease-out; }
    .bbca-box { padding: 18px 16px calc(16px + env(safe-area-inset-bottom)); }
    .bbca-title { font-size: 17px; }
    .bbca-text { font-size: 14px; }
    .bbca-btn { min-height: 46px; font-size: 15px; }
}
@keyframes bbca-sheet { from { transform: translateY(100%); } }

body.theme-dark dialog.bbca { color: #f2f4f7; background: #1f1f1f; }
body.theme-dark .bbca-title, body.theme-dark .bbca-name { color: #f9fafb; }
body.theme-dark .bbca-text, body.theme-dark .bbca-meta { color: #98a2b3; }
body.theme-dark .bbca-item { background: #262626; border-color: rgba(255, 255, 255, .08); }
body.theme-dark .bbca-icon { color: #75e0a7; background: rgba(6, 118, 71, .25); border-color: rgba(6, 118, 71, .4); }
body.theme-dark .bbca-btn.is-outline { color: #f2f4f7; background: transparent; border-color: rgba(255, 255, 255, .2); }
body.theme-dark .bbca-close:hover { color: #fff; background: rgba(255, 255, 255, .08); }
