/* ==========================================================================
   Floating Quick Actions hub — shared by service pages
   Port of the landing-page FAB (.zt-fab-* in css/hero.css) with the brand
   tokens inlined so it works on the self-contained service pages.
   Requires: js/quick-actions.js
   ========================================================================== */

.zt-fab-dock {
  position: fixed;
  right: 18px;
  bottom: 14px;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
  z-index: 1050;
  font-family: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  pointer-events: none;
}

.zt-fab-trigger,
.zt-fab-menu {
  pointer-events: auto;
}

.zt-fab-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 31, 36, 0.4);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1045;
}

.zt-fab-backdrop.zt-active {
  opacity: 1;
  pointer-events: auto;
}

.zt-fab-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: linear-gradient(135deg, #0f1f24 0%, #1e3d47 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 16px 36px -10px rgba(15, 31, 36, 0.45), 0 0 0 1px rgba(210, 138, 25, 0.25);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  outline: none;
}

.zt-fab-trigger:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -10px rgba(15, 31, 36, 0.55), 0 0 0 1px rgba(210, 138, 25, 0.45);
}

.zt-fab-trigger:focus-visible {
  box-shadow: 0 0 0 3px rgba(210, 138, 25, 0.5);
}

.zt-fab-pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #25d366;
  position: relative;
  flex-shrink: 0;
}

.zt-fab-pulse::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #25d366;
  animation: zt-fab-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes zt-fab-ping {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.zt-fab-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 20px;
  height: 20px;
}

.zt-fab-icon-open,
.zt-fab-icon-close {
  position: absolute;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.zt-fab-icon-close {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

.zt-fab-dock.zt-open .zt-fab-icon-open {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

.zt-fab-dock.zt-open .zt-fab-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}

.zt-fab-menu {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(15, 31, 36, 0.1);
  border-radius: 20px;
  box-shadow: 0 24px 60px -12px rgba(15, 31, 36, 0.28), 0 4px 16px -2px rgba(15, 31, 36, 0.08);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(12px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.24s cubic-bezier(0.16, 1, 0.3, 1), transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  transform-origin: bottom right;
}

.zt-fab-dock.zt-open .zt-fab-menu {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.zt-fab-header {
  padding: 4px 6px 10px;
  border-bottom: 1px solid rgba(15, 31, 36, 0.07);
}

.zt-fab-eyebrow {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b57114;
}

.zt-fab-title {
  margin: 3px 0 0;
  font-size: 0.96rem;
  font-weight: 800;
  color: #0f1f24;
  letter-spacing: -0.01em;
}

.zt-fab-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 14px;
  text-decoration: none;
  color: #0f1f24;
  background: rgba(243, 249, 250, 0.45);
  border: 1px solid rgba(15, 31, 36, 0.04);
  transition: all 0.2s ease;
}

.zt-fab-item:hover {
  background: #ffffff;
  border-color: rgba(210, 138, 25, 0.3);
  transform: translateX(-2px);
  box-shadow: 0 6px 18px -4px rgba(15, 31, 36, 0.08);
}

.zt-fab-item-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.zt-fab-item:hover .zt-fab-item-icon {
  transform: scale(1.08);
}

.zt-fab-icon-quote {
  background: rgba(210, 138, 25, 0.12);
  color: #b57114;
}

.zt-fab-icon-call {
  background: rgba(79, 117, 138, 0.14);
  color: #355e6b;
}

.zt-fab-icon-wa {
  background: rgba(37, 211, 102, 0.14);
  color: #128c7e;
}

.zt-fab-icon-mail {
  background: rgba(15, 31, 36, 0.08);
  color: #355e6b;
}

.zt-fab-item-text {
  flex: 1;
  min-width: 0;
}

.zt-fab-item-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0f1f24;
  line-height: 1.25;
}

.zt-fab-item-desc {
  display: block;
  font-size: 0.72rem;
  color: rgba(15, 31, 36, 0.65);
  line-height: 1.35;
  margin-top: 2px;
}

.zt-fab-arrow {
  color: rgba(15, 31, 36, 0.35);
  font-size: 0.8rem;
  transition: transform 0.2s ease, color 0.2s ease;
}

.zt-fab-item:hover .zt-fab-arrow {
  transform: translateX(3px);
  color: #b57114;
}

@media (max-width: 720px) {
  .zt-fab-dock {
    bottom: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
  }
}

@media (max-width: 575px) {
  .zt-fab-dock {
    right: 14px;
    bottom: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
  }

  .zt-fab-trigger {
    width: 52px;
    height: 52px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .zt-fab-label {
    display: none;
  }

  .zt-fab-pulse {
    position: absolute;
    top: 3px;
    right: 3px;
  }

  .zt-fab-menu {
    position: fixed;
    bottom: 74px;
    bottom: calc(max(12px, env(safe-area-inset-bottom, 12px)) + 60px);
    right: 14px;
    left: 14px;
    width: auto;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .zt-fab-pulse::after {
    animation: none;
  }

  .zt-fab-trigger,
  .zt-fab-menu,
  .zt-fab-item,
  .zt-fab-item-icon,
  .zt-fab-arrow,
  .zt-fab-icon-open,
  .zt-fab-icon-close {
    transition: none;
  }
}

/* ==========================================================================
   Floating Legal Entity Switcher Dock (Bottom Left)
   Shared across landing page & service pages - Unified Pill
   ========================================================================== */

.zt-entity-dock {
  position: fixed;
  left: 18px;
  bottom: 14px;
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(18px);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.24s ease,
              visibility 0.24s ease;
  font-family: "Mulish", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.zt-entity-dock.zt-visible,
.zt-entity-dock.zt-always-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.zt-entity-dock-card {
  display: flex;
  align-items: center;
}

/* Single unified pill container */
.zt-entity-dock-body {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 5px 4px 13px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 30px -12px rgba(15, 31, 36, 0.28), 0 2px 6px rgba(53, 94, 107, 0.08);
  color: #0f1f24;
  transition: all 0.25s ease;
}

.zt-entity-dock-body.zt-status-mismatch {
  background: #fffdf5;
  border-color: rgba(210, 138, 25, 0.55);
  box-shadow: 0 12px 30px -12px rgba(210, 138, 25, 0.35), 0 2px 6px rgba(210, 138, 25, 0.1);
}

/* Integrated context label inside the unified pill */
.zt-entity-dock-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #1a3139;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  white-space: nowrap;
  line-height: 1.25;
}

.zt-entity-dock-status strong {
  font-weight: 800;
  color: #0f1f24;
}

.zt-entity-dock-status a {
  color: #b45309;
  text-decoration: underline;
  font-weight: 700;
  transition: color 0.18s ease;
}

.zt-entity-dock-status a:hover {
  color: #78350f;
  text-decoration: none;
}

.zt-entity-dock-status.zt-status-mismatch {
  color: #92400e;
}

.zt-dock-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #d28a19;
  position: relative;
  flex-shrink: 0;
}

.zt-dock-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid #d28a19;
  animation: zt-fab-ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.zt-entity-dock-status.zt-status-mismatch .zt-dock-dot {
  background-color: #d97706;
}

.zt-entity-dock-status.zt-status-mismatch .zt-dock-dot::after {
  border-color: #d97706;
}

/* Hairline divider between context label and switch */
.zt-entity-dock-divider {
  display: inline-block;
  width: 1px;
  height: 18px;
  background: #e2e8f0;
  flex-shrink: 0;
}

.zt-entity-dock-body.zt-status-mismatch .zt-entity-dock-divider {
  background: rgba(210, 138, 25, 0.35);
}

.zt-entity-dock-switch {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 9999px;
  background: #f1f5f9;
  gap: 2px;
  flex-shrink: 0;
}

.zt-entity-dock-btn {
  border: none;
  background: transparent;
  padding: 6px 13px;
  border-radius: 9999px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  line-height: 1.1;
}

.zt-entity-dock-btn:hover {
  color: #0f1f24;
}

.zt-entity-dock-btn.active {
  background: #334155;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 31, 36, 0.22);
  font-weight: 800;
}

@media (max-width: 640px) {
  .zt-entity-dock {
    left: 12px;
    bottom: 12px;
    bottom: max(12px, env(safe-area-inset-bottom, 12px));
    max-width: calc(100vw - 80px);
  }

  .zt-entity-dock-body {
    flex-direction: column;
    align-items: flex-start;
    border-radius: 18px;
    padding: 4px;
    gap: 4px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 25px -8px rgba(15, 31, 36, 0.25);
    max-width: 100%;
  }

  .zt-entity-dock-divider {
    display: none;
  }

  /* Buttons on row 1 — side by side with Quick Actions on the right */
  .zt-entity-dock-switch {
    order: 1;
    margin: 0;
  }

  .zt-entity-dock-btn {
    padding: 6px 12px;
    font-size: 0.76rem;
  }

  /* Context text pushed down to row 2 underneath the switcher buttons */
  .zt-entity-dock-status {
    order: 2;
    font-size: 0.70rem;
    padding: 1px 8px 3px 8px;
    white-space: normal;
    line-height: 1.25;
  }
}

/* ==========================================================================
   Mobile Bottom Bar Conflict Resolution
   Hide legacy .mobilecta bar so it does not clash with or get hidden by
   Quick Actions and the Entity switcher dock.
   ========================================================================== */
.mobilecta {
  display: none !important;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 0 !important;
  }
}
