.contact-fab {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}
.contact-fab a,
.contact-fab button {
  pointer-events: auto;
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.18);
}
.contact-fab a:focus-visible,
.contact-fab button:focus-visible {
  outline: 2px solid #17212b;
  outline-offset: 3px;
}
.contact-fab-zalo { background: #0068ff; }
.contact-fab-fb { background: linear-gradient(135deg, #00c6ff 0%, #006aff 58%, #a033ff 100%); }
.contact-fab-lead { background: #0e3b34; }
.contact-fab svg {
  width: 30px;
  height: 30px;
  display: block;
  transform-origin: 50% 50%;
}
.contact-fab-zalo svg { width: 46px; height: 46px; animation: contact-fab-ring 3.6s ease-in-out infinite; }
.contact-fab-fb svg { animation: contact-fab-ring 3.8s ease-in-out 0.45s infinite; }
.contact-fab-lead svg { animation: contact-fab-ring 4s ease-in-out 0.9s infinite; }
@keyframes contact-fab-ring {
  0%, 78%, 100% { transform: rotate(0deg); }
  80% { transform: rotate(-14deg); }
  84% { transform: rotate(12deg); }
  88% { transform: rotate(-10deg); }
  92% { transform: rotate(8deg); }
  96% { transform: rotate(-3deg); }
}
.contact-fab-label {
  position: absolute;
  right: 66px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px 10px;
  border-radius: 999px;
  background: #17212b;
  color: #fff;
  font-family: "Be Vietnam Pro", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 6px 14px rgba(23, 33, 43, 0.16);
}
@media (min-width: 721px) {
  .contact-fab a:hover .contact-fab-label,
  .contact-fab a:focus-visible .contact-fab-label,
  .contact-fab button:hover .contact-fab-label,
  .contact-fab button:focus-visible .contact-fab-label { opacity: 1; }
}
@media (max-width: 720px) {
  .contact-fab-label { display: none; }
}
@media (max-width: 480px) {
  .contact-fab { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .site-footer .wrap { padding-right: 76px; }
}
@media (max-height: 420px) {
  .contact-fab { gap: 8px; }
  .contact-fab a,
  .contact-fab button { width: 44px; height: 44px; }
  .contact-fab svg { width: 24px; height: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .contact-fab svg { animation: none; }
}
.site-footer { padding-bottom: calc(210px + env(safe-area-inset-bottom, 0px)); }
.lead-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.contact-lead {
  display: flex;
  flex-direction: column;
  width: min(560px, calc(100vw - 32px));
  max-height: min(92dvh, 760px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: #fffdf9;
  color: #17212b;
  box-shadow: 0 28px 70px rgba(14, 40, 34, 0.32);
  overflow: hidden;
  animation: contact-lead-in 0.22s ease;
}
.contact-lead::backdrop {
  background: rgba(14, 28, 26, 0.48);
  backdrop-filter: blur(8px);
}
.contact-lead.is-closing { animation: contact-lead-out 0.18s ease forwards; }
@keyframes contact-lead-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
@keyframes contact-lead-out {
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}
.contact-lead-handle { display: none; }
.contact-lead-head {
  position: relative;
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 8px 12px;
  align-items: center;
  padding: 18px 18px 16px;
  background: linear-gradient(155deg, #1a6b58 0%, #0e3b34 58%, #0a2c27 100%);
  color: #f6f3ec;
}
.contact-lead-head img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #f6f3ec;
}
.contact-lead-head h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}
.contact-lead-head p { margin: 3px 0 0; color: rgba(246, 243, 236, 0.82); font-size: 0.88rem; }
.contact-lead-chips {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}
.contact-lead-chips li {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(246, 243, 236, 0.14);
  font-size: 0.75rem;
  font-weight: 600;
}
.contact-lead-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(246, 243, 236, 0.16);
  color: #fff;
  cursor: pointer;
}
.contact-lead-close svg { width: 16px; height: 16px; }
.contact-lead form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.contact-lead-scroll {
  overflow: auto;
  min-height: 0;
  padding: 16px 18px 8px;
}
.contact-lead-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
}
.contact-field { display: block; margin: 0 0 12px; }
.contact-lead-grid .contact-field { margin: 0; }
.contact-field > span,
.contact-lead-picks > legend {
  display: block;
  margin-bottom: 6px;
  font-size: 0.84rem;
  font-weight: 650;
}
.contact-field i { color: #b42318; font-style: normal; }
.contact-field-box {
  position: relative;
  display: block;
  height: 48px;
  border: 1px solid #e6e0d6;
  border-radius: 12px;
  background: #f6f3ec;
}
.contact-field-box svg {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: 0;
  color: #0e3b34;
  pointer-events: none;
  transform: translateY(-50%);
}
.contact-field-box input,
.contact-field-box textarea {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 12px;
  outline: none;
  box-shadow: none;
  appearance: none;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 1rem;
}
.contact-field-box input {
  height: 48px;
  min-height: 48px;
  max-height: 48px;
  padding: 0 12px 0 42px;
  line-height: 48px;
}
.contact-field-box textarea {
  height: auto;
  min-height: 88px;
  padding: 12px 12px 12px 42px;
  line-height: 1.45;
  resize: vertical;
}
.contact-field-box:has(textarea) { height: auto; }
.contact-field-box:has(textarea) svg { top: 14px; transform: none; }
.contact-field-box input:focus,
.contact-field-box input:focus-visible,
.contact-field-box textarea:focus,
.contact-field-box textarea:focus-visible {
  outline: none;
  box-shadow: none;
}
.contact-field-box:focus-within {
  border-color: #0e3b34;
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.28);
  background: #fff;
}
.contact-field.is-invalid .contact-field-box { border-color: #b42318; }
.contact-field-error {
  display: block;
  min-height: 0;
  margin: 4px 2px 0;
  color: #b42318;
  font-size: 0.78rem;
  font-weight: 600;
}
.contact-lead-picks { margin: 4px 0 12px; padding: 0; border: 0; }
.contact-lead-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-lead-pills label {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #e6e0d6;
  border-radius: 999px;
  background: #f6f3ec;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
}
.contact-lead-pills input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
}
.contact-lead-pills label:has(input:checked) {
  background: #0e3b34;
  border-color: #0e3b34;
  color: #f6f3ec;
}
.contact-lead-pills label:has(input:focus-visible) {
  box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.35);
}
.contact-lead-hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-lead-foot {
  flex: none;
  padding: 10px 18px 16px;
  background: #fffdf9;
  border-top: 1px solid #efe6d4;
}
.contact-lead-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(180deg, #1a6b58 0%, #0e3b34 100%);
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.contact-lead-submit[disabled] { opacity: 0.72; cursor: progress; }
.contact-lead-submit svg { width: 18px; height: 18px; }
.contact-lead-spin { display: none; animation: contact-lead-spin 0.7s linear infinite; }
.contact-lead-submit.is-loading .contact-lead-arrow { display: none; }
.contact-lead-submit.is-loading .contact-lead-spin { display: block; }
@keyframes contact-lead-spin { to { transform: rotate(360deg); } }
.contact-lead-text {
  display: block;
  width: 100%;
  margin-top: 8px;
  border: 0;
  background: transparent;
  color: #5c6b73;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.contact-lead-note { margin: 8px 0 0; color: #5c6b73; font-size: 0.75rem; text-align: center; }
.contact-lead-form-error { margin: 0 0 8px; color: #b42318; font-size: 0.84rem; font-weight: 650; }
.contact-lead :focus { outline: none; }
.contact-lead :focus-visible { outline: none; }
.contact-lead-close:focus-visible,
.contact-lead-submit:focus-visible,
.contact-lead-text:focus-visible { box-shadow: 0 0 0 3px rgba(31, 138, 112, 0.4); }
.contact-lead-success {
  padding: 36px 24px 28px;
  text-align: center;
}
.contact-lead-success h2 { margin: 12px 0 8px; font-size: 1.4rem; }
.contact-lead-success p { margin: 0 0 18px; color: #5c6b73; }
.contact-lead-check {
  width: 72px;
  height: 72px;
  margin: 0 auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ddf3ea;
  color: #0e3b34;
}
.contact-lead-check svg { width: 36px; height: 36px; }
.contact-lead-check path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: contact-lead-draw 0.45s ease forwards;
}
@keyframes contact-lead-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 720px) {
  .contact-lead {
    width: 100%;
    max-width: 100%;
    max-height: 92dvh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
    animation-name: contact-lead-sheet;
  }
  .contact-lead.is-closing { animation-name: contact-lead-sheet-out; }
  .contact-lead-handle {
    display: block;
    width: 42px;
    height: 4px;
    margin: 8px auto 0;
    border-radius: 999px;
    background: rgba(246, 243, 236, 0.45);
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
  }
  .contact-lead-head { padding: 18px 16px 12px; }
  .contact-lead-grid { grid-template-columns: 1fr; gap: 8px; }
  .contact-lead-scroll { padding: 10px 14px 4px; }
  .contact-field { margin-bottom: 8px; }
  .contact-field > span,
  .contact-lead-picks > legend { margin-bottom: 4px; }
  .contact-lead-picks { margin: 2px 0 8px; }
  .contact-lead-pills { gap: 6px; }
  .contact-lead-pills label { min-height: 34px; padding: 0 12px; font-size: 0.84rem; }
  .contact-field-box,
  .contact-field-box input { height: 52px; min-height: 52px; max-height: 52px; }
  .contact-field-box input { line-height: 52px; }
  .contact-field-box:has(textarea),
  .contact-field-box textarea { height: auto; min-height: 72px; max-height: none; }
  .contact-lead-foot { padding: 8px 14px calc(8px + env(safe-area-inset-bottom, 0px)); }
  .contact-lead-text { margin-top: 4px; }
  .contact-lead-note { margin-top: 4px; }
}
@keyframes contact-lead-sheet {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: none; }
}
@keyframes contact-lead-sheet-out {
  to { opacity: 0; transform: translateY(100%); }
}
@media (prefers-reduced-motion: reduce) {
  .contact-lead,
  .contact-lead.is-closing,
  .contact-lead-check path,
  .contact-lead-spin { animation: none; }
}
