/* Keep the complete checkout card inside the sidebar's scrollable area. */
#shopInfoModal > .modal-container > .modal-header {
    flex-shrink: 0;
}

#shopInfoModal > .modal-container > .modal-content {
    min-height: 0;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
}

#shopInfoModal .commodity-modal {
    flex: 0 0 auto;
}

#shopInfoModal .commodity-purchase-card {
    flex: 0 0 auto;
    min-width: 0;
}

@media (max-width: 768px) {
    #shopInfoModal > .modal-container {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0 !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
    }

    #shopInfoModal .commodity-modal > .card-block > .row > .col-md-4 {
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
    }

    #shopInfoModal > .modal-container > .modal-content {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}
