/*! LionCosmetic 4.6.0 — دکمهٔ شناور تماس با ما */
.bl-fab {
  --fab-c1: var(--bl-primary, #7b2fbe); --fab-c2: var(--bl-accent, #e0559c);
  --fab-x: 20px; --fab-y: 24px; --fab-ym: 84px; --fab-delay: 1s; --fab-ease: cubic-bezier(.22, .8, .24, 1);
  position: fixed; z-index: 85; bottom: calc(var(--fab-y) + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
  opacity: 0; transform: translateY(24px) scale(.8); pointer-events: none;
  transition: bottom .35s var(--fab-ease);
}
.bl-fab--left { left: calc(var(--fab-x) + env(safe-area-inset-left, 0px)); align-items: flex-start; }
.bl-fab--right { right: calc(var(--fab-x) + env(safe-area-inset-right, 0px)); align-items: flex-end; }
.bl-fab.is-ready { opacity: 1; transform: none; pointer-events: auto; animation: fabIn .8s var(--fab-ease) backwards; }

/* دکمهٔ اصلی */
.bl-fab__btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0; height: 60px; min-width: 60px; padding: 0; border: 0; border-radius: 999px;
  background: linear-gradient(135deg, var(--fab-c1), var(--fab-c2)); background-size: 160% 160%; color: #fff; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; overflow: visible;
  box-shadow: 0 14px 30px -6px rgba(123, 47, 190, .5), 0 4px 10px rgba(30, 14, 40, .18);
  box-shadow: 0 14px 30px -6px color-mix(in srgb, var(--fab-c1) 55%, transparent), 0 4px 10px rgba(30, 14, 40, .18), inset 0 1px 0 rgba(255,255,255,.35);
  transition: transform .3s var(--fab-ease), box-shadow .3s, gap .3s, padding .3s; animation: fabFlow 8s ease-in-out infinite alternate;
  -webkit-tap-highlight-color: transparent;
}
.bl-fab__btn:hover { transform: translateY(-3px) scale(1.04); box-shadow: 0 20px 38px -8px color-mix(in srgb, var(--fab-c2) 60%, transparent), 0 6px 14px rgba(30, 14, 40, .2), inset 0 1px 0 rgba(255,255,255,.4); }
.bl-fab__btn:active { transform: scale(.94); }
.bl-fab__btn:focus-visible { outline: 3px solid #fff; outline-offset: 0; box-shadow: 0 0 0 6px var(--fab-c1); }
.bl-fab__ico { display: grid; place-items: center; width: 60px; height: 60px; flex: none; transition: transform .45s var(--fab-ease), opacity .25s; }
.bl-fab__ico--close { position: absolute; top: 0; opacity: 0; transform: rotate(-90deg) scale(.5); }
.bl-fab.is-open .bl-fab__ico--open { opacity: 0; transform: rotate(90deg) scale(.5); }
.bl-fab.is-open .bl-fab__ico--close { opacity: 1; transform: none; }
.bl-fab__label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .45s var(--fab-ease), opacity .3s, margin .3s; }

/* جهت دکمه: آیکن همیشه سمت لبهٔ صفحه */
.bl-fab--left .bl-fab__btn { flex-direction: row-reverse; }
.bl-fab--left .bl-fab__ico--close { left: 0; right: auto; }
.bl-fab--right .bl-fab__ico--close { right: 0; left: auto; }

/* برچسب متنی: در ابتدا و هنگام هاور (فقط دسکتاپ) */
@media (min-width: 768px) {
  .bl-fab.has-label.is-intro .bl-fab__label, .bl-fab.has-label .bl-fab__btn:hover .bl-fab__label { max-width: 160px; margin-inline-end: 22px; opacity: 1; }
  .bl-fab--left.has-label.is-intro .bl-fab__label, .bl-fab--left.has-label .bl-fab__btn:hover .bl-fab__label { margin-inline-end: 0; margin-inline-start: 22px; }
  .bl-fab.has-label.is-open .bl-fab__label { max-width: 0; margin: 0; opacity: 0; }
}

/* حلقهٔ تپنده */
.bl-fab__ring { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.bl-fab.has-pulse:not(.is-open) .bl-fab__ring::before, .bl-fab.has-pulse:not(.is-open) .bl-fab__ring::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--fab-c1); opacity: 0; animation: fabPulse 2.8s ease-out infinite; }
.bl-fab.has-pulse:not(.is-open) .bl-fab__ring::after { animation-delay: 1.4s; border-color: var(--fab-c2); }

/* توجه‌گیری دوره‌ای */
.bl-fab.is-attn .bl-fab__ico--open { animation: fabWiggle 1.1s ease-in-out; }

/* پرده‌ی پس‌زمینه */
.bl-fab__scrim { position: fixed; inset: 0; z-index: -1; background: rgba(24, 12, 32, .28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.bl-fab.is-open .bl-fab__scrim { opacity: 1; visibility: visible; transition: opacity .3s; }

/* پنجرهٔ آیتم‌ها */
.bl-fab__panel {
  position: relative; width: min(340px, calc(100vw - 32px)); padding: 16px 14px 14px; border: 1px solid rgba(255,255,255,.85); border-radius: 26px;
  background: linear-gradient(150deg, rgba(255,255,255,.94), rgba(255,255,255,.8)); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: 0 30px 60px -14px rgba(48, 20, 58, .38), inset 0 1px 0 rgba(255,255,255,.95);
  opacity: 0; transform: translateY(14px) scale(.92); transform-origin: bottom left; transition: opacity .25s, transform .4s var(--fab-ease);
}
.bl-fab--right .bl-fab__panel { transform-origin: bottom right; }
.bl-fab__panel[hidden] { display: none; }
.bl-fab.is-open .bl-fab__panel { opacity: 1; transform: none; }
.bl-fab__panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 84px; border-radius: 26px 26px 0 0; background: rgba(123, 47, 190, .1); background: linear-gradient(135deg, color-mix(in srgb, var(--fab-c1) 16%, transparent), color-mix(in srgb, var(--fab-c2) 18%, transparent)); pointer-events: none; }
.bl-fab__head { position: relative; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 2px 6px 12px; }
.bl-fab__head-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bl-fab__head-text strong { font-size: 16px; font-weight: 800; line-height: 1.6; color: var(--bl-dark, #1d1326); }
.bl-fab__head-text span { color: var(--bl-muted, #6f647a); font-size: 12.5px; line-height: 1.8; }
.bl-fab__x { flex: none; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.8); color: var(--bl-dark, #1d1326); cursor: pointer; box-shadow: 0 2px 8px rgba(48,20,58,.12); transition: transform .25s var(--fab-ease), background .2s, color .2s; }
.bl-fab__x:hover { background: var(--fab-c1); color: #fff; transform: rotate(90deg); }

.bl-fab__list { position: relative; display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; max-height: min(60vh, 440px); overflow-y: auto; scrollbar-width: thin; }
.bl-fab__item { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.9); border-radius: 18px; background: rgba(255,255,255,.72); color: var(--bl-dark, #1d1326); box-shadow: 0 4px 14px rgba(48, 20, 58, .07); text-decoration: none; transition: transform .3s var(--fab-ease), box-shadow .3s, background .25s; }
.bl-fab__icon { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border-radius: 15px; background: var(--ic-soft, rgba(123,47,190,.14)); color: var(--ic, #7b2fbe); transition: background .25s, color .25s, transform .4s var(--fab-ease); }
.bl-fab__img { display: block; width: 28px; height: 28px; object-fit: contain; }
.bl-fab__txt { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 1px; }
.bl-fab__txt b { font-size: 14px; font-weight: 800; line-height: 1.6; }
.bl-fab__txt small { overflow: hidden; color: var(--bl-muted, #6f647a); font-size: 12px; line-height: 1.6; text-overflow: ellipsis; white-space: nowrap; direction: auto; }
.bl-fab__go { flex: none; opacity: .35; transition: transform .3s var(--fab-ease), opacity .25s; }
.bl-fab__item:hover, .bl-fab__item:focus-visible { transform: translateX(-4px); background: #fff; box-shadow: 0 12px 26px -6px var(--ic-soft, rgba(123,47,190,.3)), 0 4px 12px rgba(48,20,58,.08); outline: 0; }
.bl-fab__item:focus-visible { box-shadow: 0 0 0 3px var(--ic, #7b2fbe); }
.bl-fab__item:hover .bl-fab__icon, .bl-fab__item:focus-visible .bl-fab__icon { background: var(--ic); color: #fff; transform: rotate(-6deg) scale(1.06); }
.bl-fab__item:hover .bl-fab__go, .bl-fab__item:focus-visible .bl-fab__go { opacity: 1; transform: translateX(-4px); }
.bl-fab__item:active { transform: scale(.98); }
.bl-fab__note { position: relative; margin-top: 12px; padding: 8px 10px 0; border-top: 1px dashed rgba(var(--bl-primary-rgb, 123,47,190), .25); color: var(--bl-muted, #6f647a); font-size: 12px; text-align: center; line-height: 1.8; }

/* ورود پله‌ای آیتم‌ها */
.bl-fab.is-open .bl-fab__li { animation: fabItem .5s var(--fab-ease) backwards; animation-delay: calc(var(--i, 0) * 60ms + 90ms); }

/* دستگاه‌ها */
@media (max-width: 767px) { .bl-fab__li--desktop, .bl-fab--desktop-only { display: none !important; } }
@media (min-width: 768px) { .bl-fab__li--mobile, .bl-fab--mobile-only { display: none !important; } }

/* موبایل و تبلت: بالای نوار پایین و نوار خرید محصول */
@media (max-width: 1023px) {
  .bl-fab { bottom: calc(var(--fab-ym) + env(safe-area-inset-bottom, 0px)); }
  body.bl-fab-lift .bl-fab { bottom: calc(var(--fab-ym) + 78px + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 767px) {
  .bl-fab__btn, .bl-fab__ico { height: 56px; min-width: 56px; width: 56px; }
  .bl-fab__btn { width: 56px; }
  .bl-fab__panel { width: min(360px, calc(100vw - 28px)); border-radius: 24px; }
}

@keyframes fabIn { from { opacity: 0; transform: translateY(30px) scale(.6); } 60% { transform: translateY(-4px) scale(1.06); } }
@keyframes fabPulse { 0% { opacity: .55; transform: scale(1); } 100% { opacity: 0; transform: scale(1.75); } }
@keyframes fabFlow { from { background-position: 0 50%; } to { background-position: 100% 50%; } }
@keyframes fabItem { from { opacity: 0; transform: translateY(14px); } }
@keyframes fabWiggle { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-14deg) scale(1.12); } 30% { transform: rotate(12deg) scale(1.12); } 45% { transform: rotate(-9deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }

@media (prefers-reduced-motion: reduce) {
  .bl-fab, .bl-fab * { animation: none !important; transition-duration: .01ms !important; }
  .bl-fab.is-ready { opacity: 1; transform: none; }
}
@media (forced-colors: active) { .bl-fab__btn, .bl-fab__item { border: 2px solid ButtonText; } }
