/* ============================================================
   Floating Contact Pro — fcp.css  v1.7.0
   ============================================================ */

#fcp-root {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0;
}

/* ── Toggle row: label LEFT + circle RIGHT ───────────────── */
#fcp-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

/* ════════════════════════════════════════════════════════════
   SHARED CIRCLE BASE
   Applied to both #fcp-toggle and .fcp-link so geometry is
   identical and icons are guaranteed to be centered.
════════════════════════════════════════════════════════════ */
#fcp-toggle,
.fcp-link {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: transform .25s ease, box-shadow .25s ease;
  position: relative;
  overflow: hidden;               /* clip gradient edge cleanly */
}

/* ── Main toggle extras ─────────────────────────────────── */
#fcp-toggle {
  background-color: var(--fcp-color, #25d366);
  opacity: var(--fcp-opacity, 1);
  color: #fff;
  outline-offset: 3px;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}

#fcp-toggle:hover,
.fcp-link:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 22px rgba(0,0,0,.32);
}

#fcp-toggle:hover { opacity: 1 !important; }

#fcp-toggle:focus-visible,
.fcp-link:focus-visible {
  outline: 3px solid var(--fcp-color, #25d366);
  outline-offset: 2px;
  opacity: 1 !important;
}

/* Single-item <a> type overrides */
a#fcp-toggle[data-type="line"]      { background-color: #06c755; }
a#fcp-toggle[data-type="whatsapp"]  { background-color: #25d366; }
a#fcp-toggle[data-type="instagram"] { background: radial-gradient(circle at 30% 107%,#fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285AEB 90%); }
a#fcp-toggle[data-type="ai"]        { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
a#fcp-toggle[data-type="custom"]    { background-color: var(--fcp-color, #25d366); }

/* ── Toggle label (left of circle) ─────────────────────── */
#fcp-toggle-label {
  background: rgba(20,20,20,.80);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: none;
  user-select: none;
  transition: opacity .2s ease, transform .2s ease;
}

#fcp-toggle-wrap.fcp-open #fcp-toggle-label {
  opacity: 0;
  transform: translateX(6px);
}

/* ════════════════════════════════════════════════════════════
   ICON WRAP — used inside both #fcp-toggle and .fcp-link
   Flex container so SVG is always perfectly centred.
════════════════════════════════════════════════════════════ */
.fcp-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  position: relative;           /* needed for morph absolute children */
}

.fcp-icon-wrap svg {
  display: block;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
}

/* Morph icons (chat ↔ X) — stacked via absolute */
.fcp-icon {
  position: absolute;
  top: 0; left: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s ease, opacity .2s ease;
}

#fcp-toggle[aria-expanded="true"]  .fcp-icon-menu  { opacity: 0; transform: rotate(90deg)  scale(.7); }
#fcp-toggle[aria-expanded="true"]  .fcp-icon-close { opacity: 1; transform: rotate(0deg)   scale(1);  }
#fcp-toggle[aria-expanded="false"] .fcp-icon-menu  { opacity: 1; transform: rotate(0deg)   scale(1);  }
#fcp-toggle[aria-expanded="false"] .fcp-icon-close { opacity: 0; transform: rotate(-90deg) scale(.7); }

/* ── Items list ─────────────────────────────────────────── */
#fcp-items {
  list-style: none;
  margin: 0;
  padding: 8px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 500px;
  overflow: visible;
  transition: max-height .38s ease, opacity .28s ease, padding .28s ease;
}

#fcp-items.fcp-closed {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  pointer-events: none;
}

#fcp-items.fcp-closed .fcp-item {
  opacity: 0;
  transform: translateY(14px) scale(.86);
  pointer-events: none;
}

.fcp-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity .25s ease, transform .25s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.fcp-item:nth-child(1) { transition-delay: .04s; }
.fcp-item:nth-child(2) { transition-delay: .08s; }
.fcp-item:nth-child(3) { transition-delay: .12s; }
.fcp-item:nth-child(4) { transition-delay: .16s; }
.fcp-item:nth-child(5) { transition-delay: .20s; }

/* Label pill */
.fcp-label {
  background: rgba(20,20,20,.80);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  padding: 6px 12px;
  border-radius: 20px;
  white-space: nowrap;
  backdrop-filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

/* ── Type colours ────────────────────────────────────────── */
.fcp-link[data-type="line"]      { background: #06c755; }
.fcp-link[data-type="whatsapp"]  { background: #25d366; }
.fcp-link[data-type="instagram"] { background: radial-gradient(circle at 30% 107%,#fdf497 0%,#fdf497 5%,#fd5949 45%,#d6249f 60%,#285AEB 90%); }
.fcp-link[data-type="ai"]        { background: linear-gradient(135deg,#6366f1,#8b5cf6); }
.fcp-link[data-type="custom"]    { background: var(--fcp-color, #25d366); }

/* All coloured circles → white icons */
.fcp-link[data-type="line"] .fcp-icon-wrap svg path,
.fcp-link[data-type="whatsapp"] .fcp-icon-wrap svg path,
.fcp-link[data-type="instagram"] .fcp-icon-wrap svg path,
.fcp-link[data-type="ai"] .fcp-icon-wrap svg path,
.fcp-link[data-type="custom"] .fcp-icon-wrap svg path,
a#fcp-toggle .fcp-icon-wrap svg path { fill: #fff; }

/* Main toggle button icon */
button#fcp-toggle .fcp-icon-wrap svg path { fill: currentColor; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 480px) {
  #fcp-root { bottom: 18px; right: 18px; }
}
