/* Ported from layout/theme.liquid — WhatsApp measurement help widget */
body.template-product .insono-whatsapp-help {
  display: none !important;
}

  .insono-whatsapp-help {
    position: fixed;
    right: 18px;
    bottom: 18px;
    /* Under mobile-menu overlay (998) / drawer (999) when menu is open */
    z-index: 40;
    display: flex;
    align-items: end;
    gap: 9px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  .insono-whatsapp-help__bubble {
    display: block;
  }

  .insono-whatsapp-help__button {
    display: grid;
  }

  .insono-whatsapp-help__dock {
    display: none;
  }

  .insono-whatsapp-help__bubble {
    position: relative;
    min-width: 198px;
    max-width: 218px;
    padding: 10px 12px;
    border: 1px solid rgba(227, 222, 211, 0.9);
    border-radius: 18px 18px 6px 18px;
    background: rgba(255, 253, 248, 0.94);
    box-shadow: 0 14px 34px rgba(31, 34, 31, 0.14);
    color: #344238;
    text-decoration: none;
    backdrop-filter: blur(18px);
  }

  .insono-whatsapp-help__bubble::after {
    content: "";
    position: absolute;
    right: -6px;
    bottom: 12px;
    width: 12px;
    height: 12px;
    border-right: 1px solid rgba(227, 222, 211, 0.9);
    border-bottom: 1px solid rgba(227, 222, 211, 0.9);
    background: rgba(255, 253, 248, 0.94);
    transform: rotate(-45deg);
  }

  .insono-whatsapp-help__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 5px;
  }

  .insono-whatsapp-help__status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #25d366;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
  }

  .insono-whatsapp-help__status::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #25d366;
    box-shadow: 0 0 0 4px rgba(37, 211, 102, 0.14);
    animation: insono-wa-pulse 2.4s ease-in-out infinite;
  }

  .insono-whatsapp-help__always {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px 3px 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, #394237, #4f5f52);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1;
    box-shadow: 0 4px 10px rgba(57, 66, 55, 0.22);
  }

  .insono-whatsapp-help__always svg {
    width: 11px;
    height: 11px;
    stroke: rgba(255, 255, 255, 0.92);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
  }

  @keyframes insono-wa-pulse {
    0%,
    100% {
      opacity: 1;
      transform: scale(1);
    }

    50% {
      opacity: 0.55;
      transform: scale(0.92);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .insono-whatsapp-help__status::before,
    .insono-whatsapp-help__dock-live {
      animation: none;
    }

    .insono-whatsapp-help__dock {
      transition: none;
    }

    .insono-whatsapp-help__dock:active {
      transform: none;
    }
  }

  .insono-whatsapp-help__bubble strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    white-space: nowrap;
  }

  .insono-whatsapp-help__subtext {
    display: block;
    margin-top: 3px;
    color: #6e6b63;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.25;
  }

  .insono-whatsapp-help__button {
    position: relative;
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    place-items: center;
    border: 0;
    border-radius: 20px;
    background:
      radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.72), transparent 30%),
      linear-gradient(135deg, #35e47a, #19b95b);
    box-shadow: 0 14px 32px rgba(37, 211, 102, 0.34);
    transition: transform 180ms ease, box-shadow 180ms ease;
  }

  .insono-whatsapp-help__button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 42px rgba(37, 211, 102, 0.42);
  }

  .insono-whatsapp-help__button img {
    width: 30px;
    height: 30px;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.18));
  }

  .insono-whatsapp-help__button::before {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(37, 211, 102, 0.26);
    border-radius: 24px;
    pointer-events: none;
  }

  .insono-whatsapp-help__dock {
    position: relative;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-width: 132px;
    padding: 10px 14px 10px 10px;
    border: 1px solid rgba(57, 66, 55, 0.08);
    border-radius: 16px;
    background:
      linear-gradient(165deg, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0) 38%),
      linear-gradient(180deg, rgba(37, 211, 102, 0.05) 0%, rgba(37, 211, 102, 0) 55%),
      #fffdf9;
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 0 0 0.5px rgba(255, 255, 255, 0.6) inset,
      0 10px 24px rgba(31, 34, 31, 0.06),
      0 2px 6px rgba(31, 34, 31, 0.04);
    color: #1e211d;
    text-decoration: none;
    overflow: hidden;
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    -webkit-tap-highlight-color: transparent;
    transition:
      border-color 0.2s ease,
      box-shadow 0.2s ease,
      transform 0.2s ease;
  }

  .insono-whatsapp-help__dock:active {
    transform: scale(0.98);
    border-color: rgba(37, 211, 102, 0.18);
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 1) inset,
      0 6px 16px rgba(37, 211, 102, 0.1);
  }

  .insono-whatsapp-help__dock-accent {
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.55) 50%, transparent);
    pointer-events: none;
  }

  .insono-whatsapp-help__dock-icon {
    display: grid;
    width: 39px;
    height: 39px;
    flex-shrink: 0;
    place-items: center;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background:
      radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.35) 0%, transparent 42%),
      linear-gradient(155deg, #2ecc71 0%, #1aab54 100%);
    box-shadow:
      inset 0 1px 1px rgba(255, 255, 255, 0.3),
      0 4px 12px rgba(26, 171, 84, 0.22);
  }

  .insono-whatsapp-help__dock-icon img {
    width: 21px;
    height: 21px;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.12));
  }

  .insono-whatsapp-help__dock-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 4px;
    min-width: 0;
  }

  .insono-whatsapp-help__dock-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #157a40;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.09em;
    line-height: 1;
    text-transform: uppercase;
  }

  .insono-whatsapp-help__dock-live {
    width: 4.5px;
    height: 4.5px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.14);
    animation: insono-wa-pulse 2.8s ease-in-out infinite;
  }

  .insono-whatsapp-help__dock-hours {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px 2px 6px;
    border-radius: 999px;
    background: linear-gradient(135deg, #3a443c 0%, #4d5b50 100%);
    color: rgba(255, 255, 255, 0.94);
    font-size: 8.5px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 6px rgba(57, 66, 55, 0.18);
  }

  .insono-whatsapp-help__dock-hours::before {
    content: "";
    width: 8px;
    height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='5.75' stroke='rgba(255,255,255,0.9)' stroke-width='1.6'/%3E%3Cpath d='M8 5v3.5l2.25 1.25' stroke='rgba(255,255,255,0.9)' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
    opacity: 0.92;
  }

  @media screen and (max-width: 749px) {
    .insono-whatsapp-help {
      right: 10px;
      bottom: 10px;
      gap: 0;
    }

    .insono-whatsapp-help__bubble,
    .insono-whatsapp-help__button {
      display: none;
    }

    .insono-whatsapp-help__dock {
      display: flex;
    }
  }
