/* Allow larger text to reflow within the existing grid and flex tracks. */
#header .ct-header-text[data-id="text"] {
    flex-shrink: 1;
    min-width: 0;
}

#header .ct-header-text[data-id="text"] .entry-content > div > div:first-child,
#header a[href^="tel:"] {
    white-space: normal;
}

:where(.mg-hero-card, .mg-form-card, .mg-site-footer, .mgwl, .mg-product-page, .mg-info-content, .ct-panel) {
    overflow-wrap: anywhere;
}

:where(.mg-hero-grid, .mg-hero-icons, .mg-site-footer__grid, .mgwl-download-content) > * {
    min-width: 0;
}

.mg-form-card form button,
.mgwl .mgwl-hero-buttons a,
.mgwl .mgwl-download-button,
.mgwl .mgwl-formbox form > button,
.mgwl .mgwl-success__download {
    box-sizing: border-box;
    height: auto;
    min-height: 48px;
    max-width: 100%;
    padding-block: 8px;
    white-space: normal;
    text-align: center;
}

.mgwl .mgwl-formbox input,
.mgwl .mgwl-formbox select {
    min-width: 0;
    max-width: 100%;
}

.mgwl .mgwl-hero {
    height: auto;
    min-height: 640px;
    padding-bottom: 24px;
}

.mgwl .mgwl-footer {
    height: auto;
    min-height: 190px;
}

.mgwl .mgwl-footer > .mgwl-wrap {
    min-height: inherit;
}

.mgwl .mgwl-success__dialog {
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
}

@media (min-width: 901px) and (max-width: 1250px) {
    .mgwl .mgwl-hero { min-height: 590px; }
}

@media (max-width: 900px) {
    .mgwl .mgwl-hero { min-height: 720px; }
    .mgwl .mgwl-footer { min-height: 0; }
}
