/* Shared contact QR modal. Every contact CTA uses this small, focused dialog. */
.contact-modal,
.contact-modal * {
  box-sizing: border-box;
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.contact-modal.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.contact-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 25, 35, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.contact-modal-dialog {
  position: relative;
  z-index: 1;
  width: min(356px, calc(100vw - 32px));
  max-height: min(690px, calc(100vh - 32px));
  overflow: auto;
  padding: 28px 26px 24px;
  border: 1px solid rgba(8, 72, 96, 0.1);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(4, 33, 44, 0.3);
  color: #0a1628;
  text-align: center;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.24s ease;
}

.contact-modal.is-open .contact-modal-dialog {
  transform: translateY(0) scale(1);
}

.contact-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: #f1f7f8;
  color: #51717c;
  cursor: pointer;
  font: 500 22px/1 Arial, sans-serif;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.contact-modal-close:hover,
.contact-modal-close:focus-visible {
  outline: none;
  background: #0b6375;
  color: #fff;
}

.contact-modal-eyebrow {
  margin: 0 0 7px;
  color: #0b6375;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.contact-modal-title {
  margin: 0;
  color: #0a1628;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.35;
}

.contact-modal-lede {
  margin: 9px auto 17px;
  max-width: 270px;
  color: #5b7180;
  font-size: 13px;
  line-height: 1.65;
}

.contact-modal-qr-wrap {
  width: min(258px, 100%);
  margin: 0 auto;
  padding: 10px;
  border: 1px solid #e2eff1;
  border-radius: 14px;
  background: #f8fcfc;
}

.contact-modal-qr {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  background: #fff;
}

.contact-modal-tip {
  margin: 15px 0 0;
  color: #0b6375;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.contact-modal-note {
  margin: 5px 0 0;
  color: #8aa0a8;
  font-size: 12px;
  line-height: 1.55;
}

/* Keep legacy inline QR containers compatible while pages transition to the shared dialog. */
.contact-legacy-guide {
  margin: 14px 0 0;
  color: #0b6375;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  text-align: center;
}

@media (max-width: 480px) {
  .contact-modal { padding: 14px; }
  .contact-modal-dialog {
    width: min(340px, calc(100vw - 28px));
    padding: 25px 20px 20px;
    border-radius: 17px;
  }
  .contact-modal-title { font-size: 20px; }
  .contact-modal-qr-wrap { width: min(236px, 100%); }
}

@media (prefers-reduced-motion: reduce) {
  .contact-modal,
  .contact-modal-dialog { transition: none; }
}
