/* Atendimento contextual: CSS externo para preservar a CSP da hospedagem. */
@media (min-width: 60rem) {
  .floating-contact-dock {
    --floating-safe-shift: 0px;
    position: fixed;
    z-index: 70;
    right: calc(1.25rem + env(safe-area-inset-right, 0px));
    bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px) + var(--floating-safe-shift));
    display: block;
    width: max-content;
    height: auto;
  }
  .floating-contact-dock > a.floating-contact.floating-contact--whatsapp { position: static; visibility: visible; opacity: 1; pointer-events: auto; }
  body.cookie-notice-visible .floating-contact-dock { bottom: calc(var(--cookie-notice-height, 0px) + 2.25rem + env(safe-area-inset-bottom, 0px) + var(--floating-safe-shift)); }
}

.apm-contact-dialog {
  position: fixed;
  inset: auto 1.25rem 1.25rem auto;
  width: min(29rem, calc(100vw - 2.5rem));
  max-width: none;
  max-height: calc(100dvh - 2.5rem);
  margin: 0;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d9dfef;
  border-radius: 1.5rem;
  background: #fff;
  color: #0a1332;
  box-shadow: 0 1.5rem 5rem rgb(0 7 33 / 35%);
}

.apm-contact-dialog:not([open]) { display: none; }
.apm-contact-dialog::backdrop { background: rgb(0 7 33 / 64%); backdrop-filter: blur(4px); }
.apm-contact-dialog[open] { animation: apm-contact-enter 160ms ease-out; }
body.apm-contact-open { overflow: hidden; }
.apm-contact-panel { min-width: 0; }
.apm-contact-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: 2.65rem minmax(0, 1fr) 2.75rem;
  align-items: center;
  gap: .75rem;
  padding: 1.05rem 1.15rem;
  border-bottom: 1px solid #e7eaf5;
  background: #0a1332;
  color: #fff;
}
.apm-contact-symbol {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  background: #167746;
  color: #fff;
}
.apm-contact-symbol .icon { width: 1.55rem; height: 1.55rem; }
.apm-contact-eyebrow { display: block; margin-bottom: .2rem; color: #ffce00; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.apm-contact-heading h2 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.apm-contact-close {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.apm-contact-close:hover { background: rgb(255 255 255 / 12%); }
.apm-contact-close .icon { width: 1.1rem; height: 1.1rem; }
.apm-contact-body { padding: 1.2rem; }
.apm-contact-body > p:first-child { margin-top: 0; color: #4b5874; font-size: .9rem; line-height: 1.5; }
.apm-contact-course { margin: 0 0 1.2rem; padding: .8rem 1rem; border-left: 3px solid #ffce00; border-radius: .45rem; background: #f5f6fb; }
.apm-contact-course span { display: block; margin-bottom: .2rem; color: #526078; font-size: .72rem; }
.apm-contact-course strong { display: block; font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.apm-contact-department { margin-bottom: 1.2rem; padding-bottom: 1.2rem; border-bottom: 1px solid #e1e6f2; }
.apm-contact-body .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem .8rem; }
.apm-contact-body .form-field { min-width: 0; }
.apm-contact-body .form-field label { margin-bottom: .35rem; font-size: .8rem; }
.apm-contact-body input:not([type="checkbox"]), .apm-contact-body select { min-width: 0; width: 100%; font-size: .87rem; }
.apm-contact-body .form-field--full { grid-column: 1 / -1; }
.apm-contact-body .course-fixed-interest span { display: block; color: #526078; font-size: .72rem; line-height: 1.4; }
.apm-contact-body .course-fixed-interest strong { display: block; margin-top: .3rem; font-size: .85rem; line-height: 1.4; overflow-wrap: anywhere; }
.apm-contact-body .check-field { align-items: start; font-size: .77rem; }
.apm-contact-body .form-note, .apm-contact-routing-note { font-size: .75rem; line-height: 1.5; color: #526078; }
.apm-contact-body .form-note { margin-block: .6rem; }
.apm-contact-body .button--wide { min-height: 3rem; white-space: normal; font-size: .85rem; }
.apm-contact-routing-note { margin: 1rem 0 0; padding-top: .9rem; border-top: 1px solid #e1e6f2; }
.apm-contact-body .form-status { overflow-wrap: anywhere; }

@keyframes apm-contact-enter { from { opacity: 0; transform: translateY(.6rem); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 39.99rem) {
  .apm-contact-dialog { inset: 0; width: calc(100vw - 1.5rem); max-height: calc(100dvh - 1.5rem); margin: auto; border-radius: 1.2rem; }
  .apm-contact-heading { padding: .9rem; gap: .6rem; }
  .apm-contact-body { padding: 1rem; }
  .apm-contact-body .form-grid { grid-template-columns: minmax(0, 1fr); }
  .apm-contact-heading h2 { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) { .apm-contact-dialog[open] { animation: none; } }
