.modal_content > :first-child {
    margin-top: 0 !important;
}

.modal_component:not(.modal-fullscreen) > .modal_helper {
    width: var(--modal-width, auto);
    height: var(--modal-height, auto);
}

.modal_component.modal-fullscreen,
.modal_component.modal-fullscreen > .modal_helper {
    inset: 0;
    width: 100vw;
    height: 100dvh;
    max-width: none;
    margin: 0;
    padding: 0;
}

.modal_component .modal_sheet_drag_handle {
    display: none;
}

@media (max-width: 1024px) {
    .modal_component {
        bottom: 57px;
    }

    .modal_component > .modal_helper {
        width: 100vw;
        height: min-content;
        min-height: calc(100% - 50px);
        margin-top: 50px;
        background: white;
    }

    .modal_component.modal-fullscreen,
    .modal_component.modal-fullscreen > .modal_helper {
        top: 0;
        bottom: 0;
        width: 100vw;
        height: 100dvh;
        min-height: 100dvh;
        margin: 0;
    }

    .modal_component.modal-fullscreen.modal-nav-under,
    .modal_component.modal-fullscreen.modal-nav-under > .modal_helper {
        bottom: 57px;
        height: calc(100dvh - 57px);
        min-height: calc(100dvh - 57px);
    }

    .modal_component.modal-fullscreen:fullscreen,
    .modal_component.modal-fullscreen:fullscreen > .modal_helper {
        bottom: 0;
        height: 100dvh;
        min-height: 100dvh;
    }

    .modal_component.modal-sheet-mobile-enabled {
        top: 0;
        bottom: var(--sheet-bottom-offset, 0px);
    }

    .modal_component.modal-sheet-mobile-enabled > .modal_helper {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100vw;
        height: var(--sheet-current-height, 70vh);
        min-height: 0;
        max-height: calc(100vh - var(--sheet-bottom-offset, 0px));
        margin: 0;
        background: transparent;
        transition: height .2s ease, transform .2s ease;
    }

    .modal_component.modal-sheet-mobile-enabled .modal_sheet_card {
        display: flex;
        flex-direction: column;
        height: 100%;
        border-radius: 8px 8px 0 0;
    }

    .modal_component.modal-sheet-mobile-enabled .modal_title {
        position: relative;
        top: 0;
        padding-top: 18px;
        cursor: grab;
        touch-action: none;
    }

    .modal_component.modal-sheet-mobile-enabled .modal_title.dragging {
        cursor: grabbing;
    }

    .modal_component.modal-sheet-mobile-enabled .modal_title .modal_sheet_drag_handle {
        position: absolute;
        top: 7px;
        left: 50%;
        display: inline-block;
        width: 36px;
        height: 4px;
        border-radius: 999px;
        background: #d1d5db;
        transform: translateX(-50%);
    }

    .modal_component.modal-sheet-mobile-enabled .modal_content {
        flex: 1;
        overflow: auto;
    }

    .modal_component.modal-sheet-mobile-enabled.modal-content-no-scroll .modal_content {
        overflow: hidden;
    }
}
