.max-contact-popup {
    box-sizing: border-box;
    position: fixed;
    inset: 0;
    width: 648px;
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 44px 48px 48px;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 60px 0 rgba(0, 46, 89, 0.25);
    color: #004884;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 150%;
}

.max-contact-popup[open] { display: flex; }
.max-contact-popup:not([open]) { display: none; }
.max-contact-popup::backdrop { background: rgba(0, 46, 89, 0.4); }

html:has(.max-contact-popup[open]) {
    overflow: hidden !important;
    scrollbar-gutter: stable;
}

/* Keep the sticky header attached to the viewport while html is locked.
   The dialog's close handler restores any scroll offsets lost by clipping. */
html:has(.max-contact-popup[open]) body { overflow: clip !important; }

.max-contact-popup > * { flex-shrink: 0; }
.max-contact-popup :is(h2, h3, p) { margin: 0; color: inherit; font-family: inherit; }

.max-contact-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ccc;
    cursor: pointer;
}

.max-contact-popup__close:hover { color: #004884; }

.max-contact-popup__brand {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 24px;
    font-weight: 600;
    line-height: normal;
}

.max-contact-popup__brand svg { flex-shrink: 0; }

.max-contact-popup__illustration {
    position: absolute;
    top: 32px;
    right: 48px;
    pointer-events: none;
}

.max-contact-popup__intro {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 16px;
}

.max-contact-popup h2 {
    font-size: 32px;
    font-weight: 600;
    line-height: 120%;
}

.max-contact-popup__instructions {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    border-radius: 10px;
    background: #ecf5ff;
}

.max-contact-popup h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: normal;
}

.max-contact-popup__instructions ol {
    display: flex;
    margin: 0;
    padding: 0 !important;
    flex-direction: column;
    gap: 16px;
    list-style: none !important;
}

.max-contact-popup__instructions li {
    display: flex;
    align-items: center;
    gap: 16px;
    font-weight: 500;
    line-height: normal;
}

.max-contact-popup__number {
    display: flex;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    background: #004884;
    color: #fff;
}

.max-contact-popup .max-contact-popup__note {
    color: #4186c8;
    font-size: 14px;
    font-weight: 300;
    line-height: 140%;
}

.max-contact-popup__button {
    box-sizing: border-box;
    display: flex;
    width: 100%;
    min-height: 60px;
    padding: 16px 20px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #004884;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    line-height: 150%;
    text-align: center;
    text-decoration: none;
}

.max-contact-popup__button:active {
    background: linear-gradient(to right, #e4b65d, #f5d27a, #f7f5cc);
    color: #000;
}

@media (hover: hover) and (pointer: fine) {
    .max-contact-popup__button:hover {
        background: linear-gradient(to right, #e4b65d, #f5d27a, #f7f5cc);
        color: #000;
    }
}

.max-contact-popup :is(button, a):focus-visible {
    outline: 2px solid #4186c8;
    outline-offset: 4px;
}

@media (max-width: 600px) {
    .max-contact-popup { padding: 32px 24px 24px; gap: 20px; }
    .max-contact-popup__brand { font-size: 22px; }
    .max-contact-popup__brand svg { width: 48px; height: 48px; }
    .max-contact-popup__illustration { top: 32px; right: 32px; width: 64px; height: auto; }
    .max-contact-popup__close { top: 8px; right: 8px; }
    .max-contact-popup h2 { font-size: 26px; }
    .max-contact-popup__intro { gap: 12px; }
    .max-contact-popup__instructions { padding: 20px; }
    .max-contact-popup__instructions li { gap: 12px; }
    .max-contact-popup__button { min-height: 56px; font-size: 16px; }
}
