/* =====================================================================
   InSci — Shared Widgets: Floating Contact + PDPA Banner
   ===================================================================== */

/* ---------- Floating Contact Button ---------- */
.fc-wrap {
  position: fixed;
  bottom: 32px;
  right: 28px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.fc-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.fc-wrap.open .fc-options {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.fc-opt-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px 10px 12px;
  border-radius: var(--r-pill);
  background: #fff;
  box-shadow: var(--sh-md);
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.fc-opt-btn:hover { box-shadow: var(--sh-lg); transform: translateX(-3px); }
.fc-opt-btn .fc-ic {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.fc-opt-btn .fc-ic svg { width: 17px; height: 17px; }

/* main trigger */
.fc-main {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #06C755; /* LINE green */
  color: #fff;
  border: none;
  cursor: pointer;
  display: grid; place-items: center;
  box-shadow: 0 6px 20px -6px rgba(6,199,85,.7);
  transition: transform .2s var(--ease), box-shadow .2s;
  position: relative;
}
.fc-main:hover { transform: scale(1.08); box-shadow: 0 10px 28px -8px rgba(6,199,85,.75); }
.fc-main svg { width: 28px; height: 28px; transition: transform .25s var(--ease), opacity .2s; position:absolute; }
.fc-main .ic-line { opacity: 1; transform: scale(1); }
.fc-main .ic-close { opacity: 0; transform: scale(.6) rotate(-45deg); }
.fc-wrap.open .fc-main .ic-line { opacity: 0; transform: scale(.6) rotate(45deg); }
.fc-wrap.open .fc-main .ic-close { opacity: 1; transform: scale(1) rotate(0deg); }
.fc-wrap.open .fc-main { background: var(--ink-700); box-shadow: var(--sh-md); }

/* pulse ring */
.fc-main::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(6,199,85,.4);
  animation: fcPulse 2.4s ease-out infinite;
}
.fc-wrap.open .fc-main::after { display: none; }
@keyframes fcPulse {
  0% { transform: scale(1); opacity: .8; }
  70% { transform: scale(1.3); opacity: 0; }
  100% { transform: scale(1.3); opacity: 0; }
}

/* ---------- PDPA Banner ---------- */
.pdpa-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 990;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 32px -16px rgba(20,23,43,.18);
  padding: 18px 0;
  transform: translateY(0);
  transition: transform .4s var(--ease);
}
.pdpa-bar.hidden { transform: translateY(110%); }
.pdpa-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.pdpa-text { flex: 1; min-width: 260px; }
.pdpa-text p { font-size: 14px; color: var(--ink-700); line-height: 1.55; }
.pdpa-text a { color: var(--blue-700); font-weight: 600; text-decoration: underline; }
.pdpa-cookie-ic {
  width: 38px; height: 38px; flex-shrink: 0;
  background: var(--green-50); border-radius: 10px;
  display: grid; place-items: center; color: var(--green-600);
}
.pdpa-cookie-ic svg { width: 20px; height: 20px; }
.pdpa-actions { display: flex; gap: 10px; flex-shrink: 0; flex-wrap: wrap; }
.pdpa-accept {
  padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--green-600); color: #fff;
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border: none; cursor: pointer;
  transition: background .2s;
}
.pdpa-accept:hover { background: var(--green-700); }
.pdpa-settings {
  padding: 10px 20px; border-radius: var(--r-pill);
  background: transparent; color: var(--ink-700);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  border: 1.5px solid var(--line); cursor: pointer;
  transition: border-color .2s, color .2s;
}
.pdpa-settings:hover { border-color: var(--blue-700); color: var(--blue-700); }

@media (max-width: 600px) {
  .pdpa-actions { width: 100%; }
  .pdpa-accept, .pdpa-settings { flex: 1; text-align: center; }
  .fc-wrap { bottom: 20px; right: 16px; }
}
