/* Contact popup — Calm Minimal (light, cursor/pi.dev language). Selectors khớp chat-widget.js (không đổi JS). */
#chat-fab[hidden],
#chat-panel[hidden] {
  display: none !important;
}

#chat-fab {
  align-items: center;
  background: var(--surface, #ffffff);
  border: 1px solid var(--line-strong, rgba(0, 0, 0, 0.16));
  border-radius: 999px;
  bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  cursor: pointer;
  display: flex;
  height: 52px;
  justify-content: center;
  padding: 0;
  position: fixed;
  right: 24px;
  transition: background-color 140ms ease, border-color 140ms ease;
  width: 52px;
  z-index: 9999;
}

@media (hover: hover) and (pointer: fine) {
  #chat-fab:hover {
    background: var(--surface-2, #f4f4f5);
    border-color: rgba(0, 0, 0, 0.28);
  }
}

@media (hover: none), (pointer: coarse) {
  #chat-fab:active {
    background: var(--surface-2, #f4f4f5);
    border-color: rgba(0, 0, 0, 0.28);
  }
}

#chat-fab:focus { outline: none; }
#chat-fab:focus-visible { outline: 2px solid var(--ink, #111113); outline-offset: 3px; }
#chat-fab svg { height: 22px; width: 22px; stroke: var(--ink, #111113); fill: none; stroke-width: 1.7; }
#chat-fab .icon-close { display: none; }
#chat-fab.is-open .icon-open { display: none; }
#chat-fab.is-open .icon-close { display: block; }

#chat-panel {
  background: var(--surface, #ffffff);
  border: 1px solid var(--line-strong, rgba(0, 0, 0, 0.16));
  border-radius: var(--radius-lg, 16px);
  bottom: 88px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.16);
  height: min(560px, 72dvh);
  overflow: hidden;
  position: fixed;
  right: 24px;
  width: min(380px, calc(100vw - 24px));
  z-index: 9999;
}

#chat-frame {
  background: var(--surface, #ffffff);
  border: 0;
  display: block;
  height: 100%;
  width: 100%;
}

.footer-contact {
  background: transparent;
  border: 0;
  color: var(--ink-2, #55555e);
  cursor: pointer;
  font-size: 13px;
  padding: 0;
  text-decoration: underline;
  text-decoration-color: var(--line-strong, rgba(0, 0, 0, 0.16));
  text-underline-offset: 3px;
}

@media (max-width: 480px) {
  #chat-fab { bottom: 16px; right: 16px; }
  #chat-panel {
    bottom: 80px;
    height: min(70dvh, 600px);
    left: 12px;
    right: 12px;
    width: auto;
  }
}
