/* Quick contact dock. Zalo wordmark is the unmodified official SVG from
 * https://stc-zaloprofile.zdn.vn/pc/v1/images/logo.svg (linked at zalo.me/pc). */
.ag-contact-dock {
  position: fixed;
  right: max(24px, env(safe-area-inset-right));
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 13px;
  font-family: var(--ag-font, "Be Vietnam Pro", sans-serif);
  transition: opacity .2s ease, transform .2s ease;
}
.ag-contact-dock .ag-contact-dock-link {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 56px;
  width: 56px;
  min-height: 56px;
  margin: 0;
  padding: 0;
  color: var(--ag-ink, #142235);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s ease;
}
.ag-contact-dock .ag-contact-dock-link:hover { transform: translateX(-3px); }
.ag-contact-dock .ag-contact-dock-link:focus-visible { outline: 3px solid var(--ag-blue, #245cf2); outline-offset: 6px; border-radius: 30px; }
.ag-contact-dock-label {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  display: block;
  width: max-content;
  min-width: 155px;
  padding: 10px 15px;
  border: 1px solid var(--ag-line, #e0e5ed);
  border-radius: 12px;
  background: var(--ag-surface, #fff);
  color: var(--ag-ink, #142235);
  box-shadow: 0 8px 30px rgb(5 20 48 / 12%);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 600;
  letter-spacing: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(8px, -50%);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.ag-contact-dock-link:hover .ag-contact-dock-label,
.ag-contact-dock-link:focus-visible .ag-contact-dock-label { opacity: 1; visibility: visible; transform: translate(0, -50%); }
.ag-contact-dock-label small {
  display: block;
  margin-top: 1px;
  color: var(--ag-muted, #657185);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.8;
}
.ag-contact-dock-icon {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 50%;
  isolation: isolate;
}
.ag-contact-dock-icon::before {
  position: absolute;
  z-index: -1;
  inset: -1px;
  border: 1px solid currentColor;
  border-radius: inherit;
  content: "";
  pointer-events: none;
  animation: ag-contact-halo 4.8s ease-out infinite;
}
.ag-contact-dock-zalo .ag-contact-dock-icon {
  background: #fff;
  color: #0068ff;
  box-shadow: 0 7px 24px rgb(0 104 255 / 24%);
}
.ag-contact-dock-icon img {
  display: block;
  width: 40px;
  height: auto;
  max-width: none;
}
.ag-contact-dock-call .ag-contact-dock-icon {
  color: #fff;
  background: linear-gradient(145deg, #16ad79, #087e59);
  box-shadow: 0 7px 24px rgb(8 126 89 / 27%);
}
.ag-contact-dock-call .ag-contact-dock-icon::before { color: #20b88a; animation-delay: .75s; }
.ag-contact-dock-call .ag-icon { width: 25px; height: 25px; animation: ag-contact-ring 4.8s ease-in-out infinite; transform-origin: 50% 50%; }
body.ag-menu-open .ag-contact-dock { opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(12px); }
html[data-ag-theme="dark"] .ag-contact-dock-label { box-shadow: 0 8px 32px rgb(0 0 0 / 25%); }
@keyframes ag-contact-halo {
  0% { transform: scale(.95); opacity: .5; }
  36%, 100% { transform: scale(1.5); opacity: 0; }
}
@keyframes ag-contact-ring {
  0%, 23%, 100% { transform: rotate(0); }
  4%, 12% { transform: rotate(-12deg); }
  8%, 16% { transform: rotate(12deg); }
  20% { transform: rotate(-5deg); }
}
@media (max-width: 767px) {
  .ag-contact-dock { right: max(14px, env(safe-area-inset-right)); bottom: calc(18px + env(safe-area-inset-bottom)); gap: 12px; }
  .ag-contact-dock .ag-contact-dock-link { min-width: 50px; width: 50px; min-height: 50px; gap: 0; }
  .ag-contact-dock-icon { width: 50px; height: 50px; }
  .ag-contact-dock-icon img { width: 36px; }
  .ag-contact-dock-call .ag-icon { width: 23px; height: 23px; }
  .ag-contact-dock-label { position: absolute; width: 1px; min-width: 0; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ag-contact-dock, .ag-contact-dock *, .ag-contact-dock *::before { animation: none !important; transition: none !important; }
  .ag-contact-dock-icon::before { display: none; }
}
@media print { .ag-contact-dock { display: none !important; } }
