            modal.style.width = 'auto';
                    modal.style.maxHeight = '95vh';
                } else if (isTablet) {
                    modal.style.margin = '20px';
                    modal.style.maxWidth = 'calc(100vw - 40px)';
                    modal.style.width = 'auto';
                    modal.style.maxHeight = '90vh';
                } else {
                    modal.style.margin = '';
                    modal.style.maxWidth = 'min(95vw, 1100px)';
                    modal.style.w