
  #sonfa-contact-widget,
  #sonfa-contact-widget * {
    box-sizing: border-box;
  }

  #sonfa-contact-widget {
    --sonfa-blue: #6DB8BD;
    --sonfa-black: #151719;

    position: fixed;
    right: 40px;
    bottom: 200px;
    z-index: 99999;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;

    font-family: Arial, sans-serif;
  }

  /* Equal-size buttons */
  #sonfa-contact-widget .sonfa-contact-item {
    position: relative;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
  }

  #sonfa-contact-widget .sonfa-contact-button {
    width: 54px;
    height: 54px;
    padding: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    border: 1px solid var(--sonfa-blue);
    border-radius: 50%;
    cursor: pointer;
    text-decoration: none;

    box-shadow: 0 4px 16px rgba(0,0,0,.22);
    transition: transform .2s ease, box-shadow .2s ease;
  }

  #sonfa-contact-widget .sonfa-contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,.3);
  }

  #sonfa-contact-widget .sonfa-contact-button svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: currentColor;
  }

  /* WhatsApp */
  #sonfa-contact-widget .sonfa-wa-button {
    background: var(--sonfa-black);
    color: #fff;
  }

  /* WeChat */
  #sonfa-contact-widget .sonfa-wx-button {
    background: var(--sonfa-blue);
    color: #101718;
  }

  /* Popup card */
  #sonfa-contact-widget .sonfa-qr-card {
    position: absolute;
    right: 68px;
    bottom: -4px;

    width: 230px;
    padding: 16px;

    border: 1px solid #e8ebec;
    border-radius: 12px;
    background: #fff;
    color: #17191b;

    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(8px);

    transition: opacity .2s ease,
                transform .2s ease,
                visibility .2s ease;
  }

  #sonfa-contact-widget .sonfa-qr-card img {
    display: block;
    width: 180px;
    height: 180px;
    max-width: 100%;
    margin: 12px auto 0;
    object-fit: contain;
  }

  #sonfa-contact-widget .sonfa-qr-title {
    font-size: 16px;
    font-weight: 700;
  }

  #sonfa-contact-widget .sonfa-qr-card p {
    margin: 10px 0 8px;
    color: #555d60;
    font-size: 12px;
    line-height: 1.5;
  }

  #sonfa-contact-widget .sonfa-qr-card span {
    color: #4b9297;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
  }

  /* Desktop: hover to show the corresponding image */
  @media (hover: hover) and (pointer: fine) {
    #sonfa-contact-widget .sonfa-contact-item:hover .sonfa-qr-card,
    #sonfa-contact-widget .sonfa-contact-item:focus-within .sonfa-qr-card {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateX(0);
    }
  }

  /* Mobile */
  @media (max-width: 768px) {
    #sonfa-contact-widget {
      right: 16px;
      bottom: 170px;
      gap: 16px;
    }

    #sonfa-contact-widget .sonfa-contact-item {
      width: 48px;
      height: 48px;
      flex-basis: 48px;
    }

    #sonfa-contact-widget .sonfa-contact-button {
      width: 48px;
      height: 48px;
    }

    #sonfa-contact-widget .sonfa-contact-button svg {
      width: 25px;
      height: 25px;
    }

    #sonfa-contact-widget .sonfa-qr-card {
      position: fixed;
      right: 72px;
      bottom: auto;
      width: min(230px, calc(100vw - 100px));
      transform: translateY(6px);
    }

    #sonfa-contact-widget .sonfa-qr-card img {
      width: 100%;
      height: auto;
      aspect-ratio: 1 / 1;
    }

    #sonfa-contact-widget .sonfa-contact-item.is-open .sonfa-qr-card {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform: translateY(0);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    #sonfa-contact-widget *,
    #sonfa-contact-widget *::before,
    #sonfa-contact-widget *::after {
      transition: none !important;
    }
  }
