/* ═══════════════════════════════════════════════════════════════════════════
   MotoMagic — Floating Contact Widget  (css/contact-widget.css)
   ═══════════════════════════════════════════════════════════════════════════ */
#mm-contact-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9990;            /* below cart drawer (9995), above content */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

/* Back to top — compact control above the contact stack */
.back-to-top {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  align-self: flex-end;
  border: 1px solid rgba(255, 23, 43, .42);
  border-radius: 50%;
  color: #f5f5f6;
  background: rgba(12, 12, 14, .94);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease,
              border-color .2s ease, background .2s ease;
}
.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover {
  color: #fff;
  border-color: #ff172b;
  background: rgba(255, 23, 43, .14);
  transform: translateY(-2px);
}
.back-to-top:focus-visible {
  outline: 2px solid #ff172b;
  outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
  .back-to-top { transition: opacity .2s ease, visibility .2s ease; }
  .back-to-top:hover { transform: none; }
}

.mm-fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 8px 24px -6px rgba(0,0,0,.5);
  transition: transform .2s cubic-bezier(.22,1,.36,1), box-shadow .2s;
  position: relative;
}
.mm-fab:hover { transform: scale(1.08) translateY(-2px); }
.mm-fab:active { transform: scale(.96); }
.mm-fab:focus-visible { outline: 3px solid rgba(255,255,255,.6); outline-offset: 3px; }

.mm-fab-wa { background: #25D366; }         /* WhatsApp green */
.mm-fab-wa:hover { background: #1ebe5a; box-shadow: 0 10px 28px -6px rgba(37,211,102,.5); }
.mm-fab-vb { background: #7360F2; }         /* Viber purple */
.mm-fab-vb:hover { background: #6350e0; box-shadow: 0 10px 28px -6px rgba(115,96,242,.5); }
.mm-fab-ig { background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045); }  /* Instagram */
.mm-fab-ig:hover { box-shadow: 0 10px 28px -6px rgba(253,29,29,.5); }
.mm-fab-call { background: var(--red, #E30613); display: none; }   /* mobile-only "Call" tile inside the expandable group */
.mm-fab-call:hover { box-shadow: 0 10px 28px -6px rgba(227,6,19,.5); }

/* Group wrapper + launcher — desktop keeps the original always-visible stack */
#mm-fab-group { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
#mm-fab-launcher { display: none; }

/* Tooltip on hover (desktop) */
.mm-fab[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: rgba(15,15,16,.95);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.1);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.mm-fab:hover[data-tip]::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* Phone number pill */
.mm-fab-num {
  background: rgba(15,15,16,.92);
  color: #fff;
  border: 1px solid rgba(255,255,255,.12);
  font-family: var(--font-m, monospace);
  font-size: 12.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 99px;
  backdrop-filter: blur(8px);
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.mm-fab-num:hover { background: var(--red, #E30613); transform: translateY(-2px); }

/* ── Footer contact block ──────────────────────────────────────────────────*/
.mm-footer-contact { margin-top: 8px; }
.mm-footer-contact .mm-fc-label {
  font-size: 13px; color: var(--gray, #A0A0A0); margin-bottom: 8px;
}
.mm-footer-contact .mm-fc-label a { color: var(--white, #fff); }
.mm-footer-contact .mm-fc-label a:hover { color: var(--red, #E30613); }
.mm-fc-btns { display: flex; gap: 8px; }
.mm-fc-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 8px; font-size: 12.5px; font-weight: 700;
  color: #fff; transition: transform .18s, box-shadow .2s;
}
.mm-fc-btn:hover { transform: translateY(-2px); }
.mm-fc-wa { background: #25D366; }
.mm-fc-vb { background: #7360F2; }

/* ── Mobile: compact, 44px+ targets, never covers content ──────────────────*/
@media (max-width: 768px) {
  #mm-contact-fab { right: 14px; bottom: 78px; gap: 8px; }  /* lifted above any bottom bar */
  .mm-fab { width: 48px; height: 48px; }                     /* ≥44px touch target */
  .mm-fab-num { display: none; }                             /* hide pill to save space */
  .mm-fab[data-tip]::after { display: none; }                /* no hover tooltips on touch */

  /* One compact launcher replaces the permanent IG/WhatsApp/Viber stack */
  #mm-fab-launcher {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    border: none; padding: 0; color: #fff; background: var(--red, #E30613);
    box-shadow: 0 8px 22px -4px rgba(227,6,19,.55); cursor: pointer;
  }
  #mm-fab-launcher .mm-fab-launcher-x { display: none; }
  .mm-fab-open #mm-fab-launcher .mm-fab-launcher-ic { display: none; }
  .mm-fab-open #mm-fab-launcher .mm-fab-launcher-x { display: block; }

  #mm-fab-group {
    gap: 8px;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .mm-fab-open #mm-fab-group {
    opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0);
  }
  .mm-fab-call { display: grid; }            /* "Call" tile only exists inside the mobile group */
}
@media (max-width: 400px) {
  #mm-contact-fab { bottom: 72px; }
}
