/* ============================================================
   Floating Contact Pro — fcp.css  v1.4.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: main toggle button ─────────────────────────── */
#fcp-toggle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  background-color: var(--fcp-color, #25d366);
  opacity: var(--fcp-opacity, 1);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
  outline-offset: 3px;
  flex-shrink: 0;
  position: relative;
  text-decoration: none; /* when it's an <a> in single-item mode */
}

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

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

/* Single-item mode: link uses item type colour */
a#fcp-toggle[data-type="line"]     { background-color: #06c755; }
a#fcp-toggle[data-type="whatsapp"] { background-color: #25d366; }
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;
}

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

/* ── Icon wrapper ───────────────────────────────────────── */
/* All icon wrappers: flex-centre the SVG */
.fcp-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 0;   /* kill phantom inline gap */
}

#fcp-toggle .fcp-icon-wrap {
  position: relative;
  width: 26px;
  height: 26px;
}

#fcp-toggle .fcp-icon {
  display: block;
  width: 24px;
  height: 24px;
  transition: transform .35s ease, opacity .2s ease;
  position: absolute;
}

/* Icon morph: chat ↔ X */
#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;
}

/* Each item row */
.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; }

/* Item 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;
}

/* Item circle — same size as main 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);
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease;
}

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

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

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

/* Type colours */
.fcp-link[data-type="line"]                    { background: #06c755; }
.fcp-link[data-type="line"] svg path           { fill: #fff; }
a#fcp-toggle[data-type="line"] svg path        { fill: #fff; }

.fcp-link[data-type="whatsapp"]                { background: #25d366; }
.fcp-link[data-type="whatsapp"] svg path       { fill: #fff; }
a#fcp-toggle[data-type="whatsapp"] svg path    { fill: #fff; }

.fcp-link[data-type="custom"]                  { background: #fff; }
.fcp-link[data-type="custom"] svg path         { fill: #555; }
a#fcp-toggle[data-type="custom"] svg path      { fill: #fff; }

/* main toggle (button) icon always white */
button#fcp-toggle svg path { fill: currentColor; }

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

/* ── Instagram ───────────────────────────────────────────── */
.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="instagram"] svg path { fill: #fff; }
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="instagram"] svg path { fill: #fff; }
