/* North Fit Floating Buttons v2.1 */
#nf-floating-wrap, #nf-floating-wrap *,
#nf-home-modal, #nf-home-modal * { box-sizing: border-box; }

.nf-float-wrap {
  position: fixed;
  z-index: var(--nf-z, 99999);
  direction: rtl;
  line-height: 1.5;
  font-family: inherit;
}
.nf-float-buttons {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--nf-gap, 14px);
}

/* ---- ریست استایل دکمه‌های قالب ---- */
#nf-floating-wrap button,
#nf-home-modal button {
  all: unset;
  box-sizing: border-box;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
#nf-floating-wrap button:focus-visible,
#nf-home-modal button:focus-visible {
  outline: 3px solid rgba(0, 0, 0, .35);
  outline-offset: 3px;
}

/* ---- دکمه‌های شناور ---- */
#nf-floating-wrap .nf-float-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--nf-fab-icon, #fff);
  background: var(--nf-fab-bg, #d91512);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .22), 0 2px 6px rgba(0, 0, 0, .12);
  transition: transform .2s ease, box-shadow .2s ease;
}
#nf-floating-wrap .nf-support-btn {width: var(--nf-support-size, 74px);height: var(--nf-support-size, 74px);border-radius: 35px;}
#nf-floating-wrap .nf-home-btn    {width: var(--nf-home-size, 58px);height: var(--nf-home-size, 58px);background: var(--nf-home-bg, #d91512);border-radius: 35px;}
#nf-floating-wrap .nf-float-btn:hover  { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 30px rgba(0, 0, 0, .26); }
#nf-floating-wrap .nf-float-btn:active { transform: scale(.96); }

.nf-shape-circle .nf-float-btn { border-radius: 50%; }
.nf-shape-drop   .nf-float-btn { border-radius: 50% 50% 10px 50%; }

#nf-floating-wrap .nf-float-btn svg { display: block; width: 46%; height: 46%; }
#nf-floating-wrap .nf-float-btn .nf-fab-img { display: block; width: 56%; height: 56%; object-fit: contain; }
.nf-chat-bubble { fill: currentColor; }
.nf-chat-dots circle { fill: var(--nf-fab-bg, #d91512); }

/* ---- پنل ---- */
.nf-support-panel {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: min(340px, calc(100vw - 28px));
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.97);
  transform-origin: bottom right;
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
.nf-support-panel.is-open { opacity: 1; visibility: visible; transform: none; }

.nf-panel-card {
  background: var(--nf-panel, #fff);
  color: var(--nf-text, #222);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .22), 0 0 0 1px rgba(0, 0, 0, .05);
}
.nf-panel-head {
  position: relative;
  padding: 20px 22px 16px;
  background: #fdeeee;
  background: linear-gradient(135deg, color-mix(in srgb, var(--nf-color, #d91512) 16%, transparent), transparent 85%);
}
.nf-panel-title    { font-size: 18px; font-weight: 700; margin: 0 0 4px; padding-left: 40px; }
.nf-panel-subtitle { font-size: 13px; opacity: .65; }

#nf-floating-wrap .nf-panel-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: inherit;
  background: rgba(127, 127, 127, .14);
  transition: background .15s;
}
#nf-floating-wrap .nf-panel-close:hover { background: rgba(127, 127, 127, .28); }

/* ---- آیتم‌ها ---- */
.nf-contact-list { display: grid; gap: 10px; padding: 12px 14px 16px; }
#nf-floating-wrap a.nf-contact-item,
#nf-floating-wrap a.nf-contact-item:visited {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(127, 127, 127, .09);
  color: var(--nf-text, #222);
  text-decoration: none;
  box-shadow: none;
  border: 0;
  transition: background .18s ease, transform .18s ease;
}
#nf-floating-wrap a.nf-contact-item:hover {
  background: rgba(127, 127, 127, .17);
  transform: translateX(-3px);
  color: var(--nf-text, #222);
}
.nf-contact-icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(217, 21, 18, .2);
  border: 1px solid color-mix(in srgb, var(--nf-color, #d91512) 25%, transparent);
  overflow: hidden;
}
.nf-contact-icon:empty { display: none; }
.nf-contact-icon img { width: 28px; height: 28px; object-fit: contain; display: block; }
.nf-contact-icon svg { width: 26px; height: 26px; display: block; }
.nf-contact-label { flex: 1; font-size: 15px; font-weight: 600; }

/* ---- مودال Add to Home ---- */
.nf-home-modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--nf-z, 99999) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s;
  direction: rtl;
}
.nf-home-modal.is-open { opacity: 1; visibility: visible; }
.nf-home-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  padding: 28px 22px 22px;
  text-align: center;
  background: #fff;
  color: #222;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
}
.nf-home-card h3 { margin: 10px 0 6px; font-size: 18px; }
.nf-home-card p  { margin: 0 0 12px; font-size: 14px; color: #555; }
#nf-home-modal .nf-home-close {
  position: absolute;
  top: 14px;
  left: 14px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, .07);
  color: #222;
}
.nf-home-emoji {
  width: 64px;
  height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  color: #fff;
  background: var(--nf-color, #d91512);
}
.nf-home-steps { display: grid; gap: 8px; text-align: right; margin: 14px 0; }
.nf-home-steps > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: #f5f6f7;
  font-size: 14px;
}
.nf-home-steps b {
  flex: none;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--nf-color, #d91512);
  font-size: 13px;
}
.nf-home-note { font-size: 12px !important; color: #777 !important; margin: 0 !important; }

@media (max-width: 767px) {
  .nf-support-panel { width: min(320px, calc(100vw - 28px)); }
}
@media (prefers-reduced-motion: reduce) {
  .nf-support-panel, .nf-home-modal, #nf-floating-wrap .nf-float-btn, #nf-floating-wrap a.nf-contact-item { transition: none; }
}