/* =========================================================
   FLOATING CONTACT SPEED-DIAL & MOBILE DOCK WIDGET
   Viruksham Wealth Management
   ========================================================= */

:root {
  --fc-gold-start: #B98A38;
  --fc-gold-end: #7A5A22;
  --fc-glass-bg: rgba(251, 246, 236, 0.88);
  --fc-glass-border: rgba(169, 120, 42, 0.35);
  --fc-shadow-soft: 0 10px 30px rgba(74, 50, 34, 0.18);
  --fc-shadow-hover: 0 14px 38px rgba(74, 50, 34, 0.28);
  --fc-text-dark: #3B2A1A;
  --fc-text-muted: #6E5336;
  --fc-whatsapp: #25D366;
  --fc-call: #A9782A;
  --fc-email: #6B4E1E;
}

/* Dim & Blur Backdrop */
.fc-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(59, 42, 26, 0.32);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.fc-backdrop.is-active {
  opacity: 1;
  visibility: visible;
}

/* Floating Root Container (Desktop & Tablet) */
.fc-speed-dial-wrap {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-family: 'Josefin Sans', -apple-system, sans-serif;
  user-select: none;
}

/* Staggered Action Menu */
.fc-actions-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 14px;
  pointer-events: none;
  visibility: hidden;
}

.fc-speed-dial-wrap.is-open .fc-actions-stack {
  pointer-events: auto;
  visibility: visible;
}

/* Action Glass Pill */
.fc-action-pill-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  opacity: 0;
  transform: translateY(16px) scale(0.92);
  transition: transform 0.24s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.22s ease-out;
}

.fc-speed-dial-wrap.is-open .fc-action-pill-wrap:nth-child(1) {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 120ms;
}

.fc-speed-dial-wrap.is-open .fc-action-pill-wrap:nth-child(2) {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 60ms;
}

.fc-speed-dial-wrap.is-open .fc-action-pill-wrap:nth-child(3) {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition-delay: 0ms;
}

.fc-action-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 16px 6px 8px;
  background: var(--fc-glass-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--fc-glass-border);
  border-radius: 9999px;
  box-shadow: var(--fc-shadow-soft);
  text-decoration: none;
  color: var(--fc-text-dark);
  cursor: pointer;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.fc-action-pill:hover {
  transform: translateY(-3px);
  border-color: var(--fc-gold-start);
  box-shadow: var(--fc-shadow-hover);
  background: rgba(255, 252, 245, 0.96);
}

.fc-action-pill:active {
  transform: scale(0.97);
}

.fc-action-pill:focus-visible {
  outline: 2px solid var(--fc-gold-start);
  outline-offset: 3px;
}

/* Icon Wells */
.fc-icon-well {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(74, 50, 34, 0.08);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.fc-action-pill:hover .fc-icon-well {
  transform: scale(1.05);
}

/* Specific Channel Icon Styling */
.fc-action-pill--whatsapp .fc-icon-well {
  color: var(--fc-whatsapp);
}
.fc-action-pill--whatsapp:hover .fc-icon-well {
  background: var(--fc-whatsapp);
  color: #FFFFFF;
}

.fc-action-pill--email .fc-icon-well {
  color: var(--fc-email);
}
.fc-action-pill--email:hover .fc-icon-well {
  background: var(--fc-email);
  color: #FFFFFF;
}

.fc-action-pill--call .fc-icon-well {
  color: var(--fc-call);
}
.fc-action-pill--call:hover .fc-icon-well {
  background: var(--fc-call);
  color: #FFFFFF;
}

/* Text Meta Inside Action Pill */
.fc-action-text {
  display: flex;
  flex-direction: column;
  text-align: right;
}

.fc-action-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fc-text-dark);
  line-height: 1.2;
}

.fc-action-subtitle {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--fc-text-muted);
  line-height: 1.2;
  margin-top: 2px;
}

/* Quick Copy Button */
.fc-copy-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(251, 246, 236, 0.9);
  border: 1px solid var(--fc-glass-border);
  color: var(--fc-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(74, 50, 34, 0.1);
  opacity: 0.85;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.fc-copy-btn:hover {
  transform: scale(1.1);
  opacity: 1;
  background: #FFFFFF;
  color: var(--fc-gold-start);
  border-color: var(--fc-gold-start);
}

/* Main Trigger Button */
.fc-main-trigger {
  height: 56px;
  min-width: 56px;
  padding: 0 22px;
  border-radius: 9999px;
  background: linear-gradient(135deg, var(--fc-gold-start) 0%, var(--fc-gold-end) 100%);
  color: #FFFDF8;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 28px rgba(122, 90, 34, 0.38);
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease, transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  outline: none;
}

.fc-main-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(122, 90, 34, 0.48);
}

.fc-main-trigger:active {
  transform: scale(0.97);
}

.fc-main-trigger:focus-visible {
  outline: 2px solid var(--fc-gold-start);
  outline-offset: 3px;
}

/* Attention Pulse Ring */
.fc-main-trigger.has-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 9999px;
  border: 2px solid var(--fc-gold-start);
  animation: fc-pulse-ring 2.4s infinite cubic-bezier(0.25, 0.8, 0.25, 1);
  pointer-events: none;
}

@keyframes fc-pulse-ring {
  0% {
    transform: scale(0.98);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.35);
    opacity: 0;
  }
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

/* Icon & Label Morphing */
.fc-trigger-icon-wrap {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fc-trigger-icon-chat,
.fc-trigger-icon-close {
  position: absolute;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.fc-trigger-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.5);
}

.fc-speed-dial-wrap.is-open .fc-trigger-icon-wrap {
  transform: rotate(90deg);
}

.fc-speed-dial-wrap.is-open .fc-trigger-icon-chat {
  opacity: 0;
  transform: scale(0.5);
}

.fc-speed-dial-wrap.is-open .fc-trigger-icon-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.fc-trigger-label {
  white-space: nowrap;
  transition: opacity 0.2s ease, max-width 0.3s ease;
  max-width: 120px;
  overflow: hidden;
}

/* Shrunk circle on scroll down */
.fc-speed-dial-wrap.is-shrunk .fc-main-trigger {
  padding: 0 16px;
  width: 56px;
}

.fc-speed-dial-wrap.is-shrunk .fc-trigger-label {
  opacity: 0;
  max-width: 0;
  margin: 0;
}

/* Copy Toast */
.fc-toast {
  position: fixed;
  bottom: 96px;
  right: 28px;
  background: var(--fc-text-dark);
  color: #FFFDF8;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  z-index: 10000;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-family: 'Josefin Sans', sans-serif;
}

.fc-toast.is-show {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Bottom-Docked Glass Bar (<= 640px) */
.fc-mobile-dock {
  display: none;
}

@media (max-width: 640px) {
  .fc-speed-dial-wrap,
  .fc-backdrop {
    display: none !important;
  }

  .fc-mobile-dock {
    position: fixed;
    bottom: 14px;
    left: 14px;
    right: 14px;
    height: 64px;
    border-radius: 20px;
    background: rgba(251, 246, 236, 0.92);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--fc-glass-border);
    box-shadow: 0 12px 36px rgba(74, 50, 34, 0.22);
    display: grid;
    grid-template-columns: 1.15fr 1fr 1fr;
    gap: 8px;
    padding: 6px 10px;
    z-index: 9999;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
    font-family: 'Josefin Sans', -apple-system, sans-serif;
  }

  .fc-mobile-dock.is-hidden {
    transform: translateY(130%);
    opacity: 0;
  }

  .fc-mobile-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--fc-text-dark);
    font-size: 11.5px;
    font-weight: 700;
    transition: background 0.2s ease, transform 0.15s ease;
  }

  .fc-mobile-btn svg {
    width: 20px;
    height: 20px;
  }

  .fc-mobile-btn:active {
    transform: scale(0.95);
  }

  .fc-mobile-btn--whatsapp {
    background: rgba(37, 211, 102, 0.14);
    color: #128C7E;
    border: 1px solid rgba(37, 211, 102, 0.28);
  }

  .fc-mobile-btn--call {
    color: var(--fc-call);
  }

  .fc-mobile-btn--email {
    color: var(--fc-email);
  }
}

@media (prefers-reduced-motion: reduce) {
  .fc-action-pill-wrap,
  .fc-main-trigger,
  .fc-backdrop,
  .fc-mobile-dock,
  .fc-toast {
    transition: none !important;
    animation: none !important;
  }
}
