.ptf-fcb *{box-sizing:border-box}
.ptf-fcb-desktop{position:fixed;right:var(--ptf-fcb-right,18px);bottom:var(--ptf-fcb-bottom,56px);z-index:9998;display:flex;flex-direction:column;gap:10px}
.ptf-fcb-desktop-item{width:46px;height:46px;border-radius:50%;background:#fff;border:1px solid rgba(0,0,0,.12);box-shadow:0 8px 24px rgba(0,0,0,.12);display:flex;align-items:center;justify-content:center;color:#111;text-decoration:none;transition:transform .2s ease, box-shadow .2s ease, color .2s ease}
.ptf-fcb-desktop-item:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(0,0,0,.16);color:#111}
.ptf-fcb-icon{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;line-height:1}
.ptf-fcb-icon svg{width:22px;height:22px;display:block}
.ptf-fcb-type-zalo{color:#0a7cff}
.ptf-fcb-type-phone{color:#2ca54d}
.ptf-fcb-type-messenger,.ptf-fcb-type-facebook{color:#1f67ff}
.ptf-fcb-type-map{color:#e15544}

.ptf-fcb-mobile{display:none;position:fixed;left:0;right:0;bottom:0;height:var(--ptf-fcb-mobile-height,68px);background:#fff;border-top:1px solid rgba(0,0,0,.08);box-shadow:0 -6px 18px rgba(0,0,0,.08);z-index:9998;padding:6px 8px calc(6px + env(safe-area-inset-bottom,0px));grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.ptf-fcb-mobile-item{display:flex;flex-direction:column;align-items:center;justify-content:center;text-decoration:none;color:#111;gap:3px;min-width:0;padding:2px 0}
.ptf-fcb-mobile-item .ptf-fcb-icon{width:20px;height:20px}
.ptf-fcb-mobile-item .ptf-fcb-icon svg{width:20px;height:20px}
.ptf-fcb-label{font-size:12px;line-height:1.15;font-weight:600;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}

@media (max-width: 767px){
  .ptf-fcb-desktop{display:none}
  .ptf-fcb-mobile{display:grid}
  body{padding-bottom:calc(var(--ptf-fcb-mobile-height,68px) + env(safe-area-inset-bottom,0px));}
}
@media (min-width: 768px){
  .ptf-fcb-mobile{display:none!important}
}

/* v1.0.3: Zalo wordmark, blue desktop and monochrome mobile. */
.ptf-fcb-desktop-item.ptf-fcb-type-zalo{background:#fff;border:1px solid rgba(0,0,0,.12);box-shadow:0 8px 24px rgba(0,0,0,.12);color:#1685f7}
.ptf-fcb-desktop-item.ptf-fcb-type-zalo .ptf-fcb-icon{width:38px;height:26px}
.ptf-fcb-desktop-item.ptf-fcb-type-zalo svg{width:38px;height:26px}
@media(max-width:767px){
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo{color:#111;gap:3px}
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon,.ptf-fcb-mobile-item.ptf-fcb-type-zalo svg{width:25px;height:23px}
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon{height:20px}
  /* Uniform monochrome icons in the mobile contact bar. */
  .ptf-fcb-mobile-item.ptf-fcb-type-phone,
  .ptf-fcb-mobile-item.ptf-fcb-type-messenger,
  .ptf-fcb-mobile-item.ptf-fcb-type-facebook,
  .ptf-fcb-mobile-item.ptf-fcb-type-map{color:#111}
}

/* v1.0.4: Make the horizontal Zalo wordmark readable on narrow screens.
 * Keep its natural aspect ratio (110:58) instead of squeezing it into a 25px square. */
@media (max-width:767px){
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon{
    width:56px!important;height:30px!important;flex:0 0 30px!important;
    overflow:visible!important;
  }
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon svg{
    width:56px!important;height:30px!important;max-width:none!important;
    display:block!important;overflow:visible!important;
  }
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo{gap:0!important}
}

/* v1.0.5: Slightly reduce only the mobile Zalo wordmark for visual balance. */
@media (max-width:767px){
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon{
    width:44px!important;height:24px!important;flex:0 0 24px!important;
  }
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon svg{
    width:44px!important;height:24px!important;
  }
  .ptf-fcb-mobile-item.ptf-fcb-type-zalo{gap:3px!important}
}

/* v1.0.6 - compact monochrome outline icons like the supplied mobile screenshot. */
@media (max-width: 767px){
 .ptf-fcb-mobile-item{color:#151515!important;gap:3px!important}
 .ptf-fcb-mobile-item .ptf-fcb-icon{width:23px!important;height:22px!important;flex:0 0 22px!important;overflow:visible!important}
 .ptf-fcb-mobile-item .ptf-fcb-icon svg{width:23px!important;height:22px!important;max-width:none!important;overflow:visible!important;color:#151515!important}
 .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon{width:37px!important;height:22px!important;flex:0 0 22px!important}
 .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon svg{width:37px!important;height:22px!important}
 .ptf-fcb-label{font-size:12px;line-height:1.2;font-weight:600;color:#111}
}

/* v1.0.7: exact user-provided Zalo mobile asset, fitted to the other small icons. */
@media (max-width:767px){
 .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon{width:29px!important;height:23px!important;flex:0 0 23px!important}
 .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-zalo-mobile-image{display:block!important;width:29px!important;height:23px!important;object-fit:contain!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}
}

/* v1.1.0: optional per-button image icons and gentle desktop motion. */
.ptf-fcb-desktop-item .ptf-fcb-icon:has(.ptf-fcb-custom-icon){width:32px;height:32px}
.ptf-fcb-desktop-item .ptf-fcb-custom-icon{display:block!important;width:32px!important;height:32px!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;margin:0!important;border:0!important;box-shadow:none!important}
@media(max-width:767px){
 .ptf-fcb-mobile-item .ptf-fcb-icon:has(.ptf-fcb-custom-icon),
 .ptf-fcb-mobile-item.ptf-fcb-type-zalo .ptf-fcb-icon:has(.ptf-fcb-custom-icon){width:29px!important;height:23px!important;flex:0 0 23px!important}
 .ptf-fcb-mobile-item .ptf-fcb-custom-icon{width:29px!important;height:23px!important;max-width:100%!important;max-height:100%!important;object-fit:contain!important;display:block!important;margin:0!important;border:0!important;box-shadow:none!important}
}
@media(min-width:768px){
 .ptf-fcb-desktop-item{transform-origin:center center;will-change:transform}
 .ptf-fcb-desktop-item.ptf-fcb-effect-shake{animation:ptf-fcb-stronger-shake 3.9s ease-in-out infinite}
 .ptf-fcb-desktop-item.ptf-fcb-effect-pulse{animation:ptf-fcb-stronger-pulse 2.7s ease-in-out infinite}
 .ptf-fcb-desktop-item:hover,.ptf-fcb-desktop-item:focus-visible{animation-play-state:paused}
}
@keyframes ptf-fcb-stronger-shake{
  0%,58%,100%{transform:translate3d(0,0,0) rotate(0deg) scale(1)}
  62%{transform:translate3d(-1px,0,0) rotate(-14deg) scale(1.03)}
  66%{transform:translate3d(1px,0,0) rotate(14deg) scale(1.03)}
  70%{transform:translate3d(-1px,0,0) rotate(-12deg) scale(1.03)}
  74%{transform:translate3d(1px,0,0) rotate(12deg) scale(1.03)}
  78%{transform:translate3d(-1px,0,0) rotate(-8deg) scale(1.02)}
  82%{transform:translate3d(1px,0,0) rotate(8deg) scale(1.02)}
  86%{transform:translate3d(0,0,0) rotate(0deg) scale(1)}
}
@keyframes ptf-fcb-stronger-pulse{
  0%,100%{transform:scale(1)}
  35%{transform:scale(1.08)}
  50%{transform:scale(1.2)}
  65%{transform:scale(1.08)}
}
@media(prefers-reduced-motion:reduce){.ptf-fcb-desktop-item{animation:none!important;transition:none!important}}

/* v1.1.5 Back to Top: a compact independent toggle, visually matching the floating contacts. */
.ptf-fcb-back-to-top{appearance:none;-webkit-appearance:none;display:flex;align-items:center;justify-content:center;width:46px;height:46px;padding:0;border-radius:50%;border:1px solid #ff9e24;background:linear-gradient(145deg,#ffad28,#ff7500);color:#fff;box-shadow:0 3px 11px rgba(255,119,0,.18);cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(8px);transition:opacity .22s ease,transform .22s ease,visibility .22s,box-shadow .22s ease;}
.ptf-fcb-back-to-top.is-visible{opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0)}
.ptf-fcb-back-to-top:hover{box-shadow:0 5px 13px rgba(255,119,0,.25);filter:brightness(1.04)}
.ptf-fcb-back-to-top:focus-visible{outline:3px solid #0b326d;outline-offset:2px}
.ptf-fcb-back-to-top svg{width:23px;height:23px;display:block;flex-shrink:0}
.ptf-fcb-back-to-top-mobile{display:none}
@media(max-width:767px){
 .ptf-fcb-back-to-top-desktop{display:none}
 .ptf-fcb-back-to-top-mobile{display:flex;position:fixed;right:14px;bottom:calc(var(--ptf-fcb-mobile-height,68px) + env(safe-area-inset-bottom,0px) + 14px);width:42px;height:42px;z-index:9998}
 .ptf-fcb-back-to-top-mobile svg{width:21px;height:21px}
}
@media(min-width:768px){.ptf-fcb-back-to-top-mobile{display:none!important}}
@media(prefers-reduced-motion:reduce){.ptf-fcb-back-to-top{transition:none!important}}
