html:has(.am-contact[open]) { overflow: hidden; scrollbar-gutter: stable; }
.foot .foot-contact { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: 2px 20px; }
.foot .foot-contact a { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; color: #e5eff8; font-size: .9rem; white-space: nowrap; }
.foot .foot-contact a:hover { color: white; text-decoration: underline; text-underline-offset: .2em; }
@media (max-width: 540px) {
  .foot .foot-contact { justify-content: start; }
}
.am-contact {
  position: fixed;
  inset: 0;
  width: min(610px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #bccedd;
  border-radius: 14px;
  color: #1b3751;
  background: #fff;
  box-shadow: 0 24px 72px rgb(10 33 53 / 24%);
  font-family: var(--font-ui, Inter, Arial, sans-serif);
}
.am-contact::backdrop { background: rgb(12 32 51 / 53%); }
.am-contact-head {
  position: relative;
  padding: 22px 70px 20px 26px;
  background: #f3f7fb;
  border-bottom: 1px solid #d3e0e9;
}
.am-contact-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #284fa3;
  font-size: .97rem;
  font-weight: 720;
  letter-spacing: -.04em;
  line-height: 1.2;
}
.am-contact h2 {
  margin: 7px 0 0;
  color: #19334c;
  font: 670 clamp(1.45rem, 3vw, 1.95rem)/1.16 var(--font-heading, var(--font-ui, sans-serif));
  letter-spacing: -.025em;
}
.am-contact .am-contact-context {
  margin: 7px 0 0;
  color: #4a647a;
  font-size: .89rem;
  overflow-wrap: anywhere;
}
.am-contact-close {
  position: absolute;
  right: 18px;
  top: 17px;
  display: grid;
  width: 42px;
  height: 42px;
  padding: 0;
  place-items: center;
  border: 1px solid #c4d5e2;
  border-radius: 50%;
  background: white;
  color: #29485e;
  font: 400 1.6rem/1 Arial, sans-serif;
}
.am-contact-close:hover { background: #e7f0f8; }
.am-contact-methods {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 22px 0 24px;
}
.am-contact-method {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  align-items: start;
  justify-items: center;
  min-width: 0;
  padding: 0 22px;
  text-align: center;
}
.am-contact-method + .am-contact-method { border-left: 1px solid #d5e1e9; }
.am-contact-method h3 {
  margin: 0;
  color: #1b3851;
  font: 670 1.17rem/1.25 var(--font-ui, sans-serif);
  letter-spacing: -.015em;
}
.am-contact-method p, .am-contact-phone {
  margin: 6px 0 0;
  font-size: .88rem;
  line-height: 1.4;
  color: #4c6377;
}
.am-contact-phone { font-variant-numeric: tabular-nums; }
.am-contact-phone:hover { text-decoration: underline; text-underline-offset: .16em; }
.am-scan-mobile { display: none; }
.am-contact-qr {
  display: block;
  align-self: center;
  width: min(180px, 100%);
  aspect-ratio: 1;
  margin: 13px auto 16px;
  padding: 4px;
  background: white;
}
.am-contact-qr img { display: block; height: 100%; width: 100%; object-fit: contain; }
.am-contact-action {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: 100%;
  padding: 9px 12px;
  font: 620 .90rem/1.35 var(--font-ui, sans-serif);
  text-align: center;
  text-decoration: none;
  border: 1px solid #adc3d5;
  border-radius: 6px;
  color: #254c72;
  background: white;
}
.am-contact-chat { background: #214ea0; border-color: #214ea0; color: #fff; }
.am-contact-chat:hover { background: #173e83; }
.am-contact-save:hover { background: #f0f6fa; }
.am-contact :is(a,button):focus-visible { outline: 2px solid #1469a9; outline-offset: 2px; }
@media (max-width: 540px) {
  html:has(.am-contact[open]) { scrollbar-gutter: auto; }
  .am-scan-desktop { display: none; }
  .am-scan-mobile { display: inline; }
  .am-contact {
    inset: auto 0 0;
    width: 100%;
    max-height: 95dvh;
    margin: 0;
    border-radius: 16px 16px 0 0;
    border: 0;
  }
  .am-contact-head { padding: 18px 68px 16px 20px; }
  .am-contact-close { top: 15px; right: 16px; }
  .am-contact-methods { grid-template-columns: 1fr; gap: 16px; padding: 18px 20px calc(18px + env(safe-area-inset-bottom)); }
  .am-contact-method {
    grid-template-rows: auto;
    justify-items: start;
    padding: 0;
    text-align: start;
  }
  .am-contact-method + .am-contact-method { padding-top: 16px; border: 0; border-top: 1px solid #d5e1e9; }
  .am-contact-whatsapp .am-contact-qr { display: none; }
  .am-contact-whatsapp .am-contact-action { margin-top: 11px; }
  .am-contact-wechat {
    grid-template-columns: minmax(0, 1fr) minmax(120px, 44%);
    align-content: center;
    align-items: center;
    gap: 0 10px;
  }
  .am-contact-wechat .am-contact-qr { grid-area: 1 / 2 / 4 / 3; margin: 0; width: 100%; max-width: 166px; justify-self: end; }
  .am-contact-wechat .am-contact-action { align-self: end; width: auto; margin-top: 9px; }
}
@media (max-width: 350px) {
  .am-contact-methods { padding-inline: 16px; }
  .am-contact-wechat .am-contact-action { font-size: .8rem; padding-inline: 8px; }
}
.am-contact.has-sheet { width: min(800px, calc(100% - 32px)); }
.has-sheet .am-contact-body { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, 1fr); }
.am-sheet-preview { min-width: 0; padding: 24px; }
.am-sheet-preview label { display: block; margin-bottom: 9px; font-weight: 650; }
.am-sheet-preview textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 12rem;
  height: clamp(14rem, 36vh, 22rem);
  padding: 14px;
  resize: vertical;
  border: 1px solid #b9cbdb;
  border-radius: 6px;
  background: #fcfdff;
  color: #20374e;
  font: 400 .94rem/1.6 var(--font-ui, sans-serif);
}
.am-sheet-preview textarea:focus-visible { outline: 2px solid #2857a4; outline-offset: 2px; }
.am-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.am-sheet-actions .am-contact-action { width: auto; }
.am-sheet-actions button { background: #214ea0; color: #fff; border-color: #214ea0; cursor: pointer; }
.am-sheet-actions button:hover { background: #173e83; }
.am-sheet-actions a:hover { background: #f0f6fa; }
.am-sheet-status { min-height: 1.4em; margin: 6px 0 0; color: #345d66; font-size: .86rem; }
.has-sheet .am-contact-methods { display: block; padding: 24px 22px; border-left: 1px solid #d5e1e9; }
.has-sheet .am-contact-method { display: block; padding: 0; text-align: start; }
.has-sheet .am-contact-method + .am-contact-method { margin-top: 18px; padding-top: 16px; border: 0; border-top: 1px solid #d5e1e9; }
.has-sheet .am-contact-phone { display: block; }
.has-sheet .am-contact-chat { margin-top: 10px; }
.has-sheet .am-contact-qr { width: 114px; margin: 10px 0 0; }
.has-sheet .am-contact-save { justify-content: start; width: auto; padding-inline: 0; border: 0; background: transparent; }
@media (max-width: 620px) {
  .am-contact.has-sheet { width: min(100%, 540px); }
  .has-sheet .am-contact-body { grid-template-columns: minmax(0, 1fr); }
  .am-sheet-preview { padding: 16px 20px 12px; }
  .am-sheet-preview textarea { min-height: 9rem; height: clamp(10rem, 28dvh, 14rem); }
  .am-sheet-status:empty { min-height: 0; margin: 0; }
  .has-sheet .am-contact-methods { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-left: 0; border-top: 1px solid #d5e1e9; }
  .has-sheet .am-contact-wechat { display: grid; grid-template-columns: minmax(0, 1fr) 100px; gap: 0 12px; align-items: start; }
  .has-sheet .am-contact-wechat .am-contact-qr { grid-area: 1 / 2 / 4 / 3; width: 100%; margin: 0; }
  .has-sheet .am-contact-wechat .am-contact-save { margin-top: 0; }
}
