/* Aplicado somente aos diálogos de viewport reconhecidos pelo helper compartilhado. */
@media screen and (max-width: 768px), screen and (max-height: 500px) and (pointer: coarse) {
    html body.me-dialog-open #mobileBottomNav { display: none !important; }
    html body [data-me-dialog-overlay] { -webkit-overflow-scrolling: touch; }
    html body [data-me-dialog-card] {
        overscroll-behavior: contain;
        overflow-wrap: anywhere;
    }
    html body [data-me-dialog-card] :is(.modal-header, .modal-footer, .mc-sidebar, .modal-actions, .confirm-btns) {
        flex-shrink: 0;
    }
    html body [data-me-dialog-card] :is(.modal-body, .modal-body-flex, .mc-body, .mc-content-area, .cadastro-form, .form-group, .form-row) {
        min-width: 0;
        min-height: 0;
    }
    html body [data-me-dialog-card] :is(.modal-body, .cadastro-form) {
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }
    html body [data-me-dialog-card] :is(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea) {
        box-sizing: border-box;
        min-width: 0;
        max-width: 100%;
        font-size: 16px;
    }
    html body [data-me-dialog-card] :is(.modal-close, .close-modal, [aria-label="Fechar"]) {
        min-width: 44px;
        min-height: 44px;
        flex-shrink: 0;
    }
    html body [data-me-dialog-card] :is(.foto-lightbox img, .wa-lightbox-content img) {
        max-width: 100%;
        max-height: var(--me-dialog-available-height);
        object-fit: contain;
    }
    /* O recuo seguro passa a pertencer ao overlay, sem somá-lo de novo no cabeçalho. */
    html body #modalEvento[data-me-dialog-overlay] .modal-content.modal-cadastro .modal-header {
        padding-top: 10px;
    }
}
